Navigation path generation system and method for robots
Patent Information
- Application Number
- CN202510848610.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2045-06-24
AI Technical Summary
[0005]因此,本发明提供了一种机器人的导航路径生成方法解决多源数据融合后难以适应环境变化和预测误差大的问题
[0033]本发明有益效果为:通过Transformer模型对多源特征集合进行动态权重分配,实现了多模态特征的适应性融合和高精度轨迹预测,并且还利用注意力机制和LSTM网络的协同,克服了传统固定权重融合和简单预测模型的局限性,显著提高了特征融合的环境适应性和轨迹预测的精度,增强了导航对动态障碍物的响应能力。
Smart Images

Figure CN120800374B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning, and in particular to a navigation path generation system and method for robots. Background Technology
[0002] Robot navigation path generation technology is the core of autonomous robot movement and is widely used in industrial warehousing, service robots, and autonomous driving. With advancements in sensor technology and computing power, navigation path generation methods have evolved from single-sensor-based to multimodal perception, and from static environment planning to dynamic environment adaptation. Existing path generation methods rely on LiDAR to generate two-dimensional grid maps, combined with A* or Dijkstra's algorithms for global path planning, such as ROS-based navigation stacks for path search in static environments. Subsequently, the introduction of RGB cameras and depth sensors enhanced semantic perception capabilities, and convolutional neural networks were used to extract image features for obstacle classification. Local planning algorithms such as dynamic windowing and temporal elastic bands achieve real-time obstacle avoidance through velocity space search, adapting to robot kinematic constraints. These technological advancements have significantly improved robot navigation performance in complex environments, but challenges remain regarding multi-source data fusion efficiency, dynamic obstacle prediction accuracy, and real-time performance of local paths.
[0003] Existing path generation methods still have room for improvement. For example, traditional multi-source data fusion methods often use fixed weights or simple splicing, making it difficult to adapt to environmental changes. For instance, the reliability of RGB image features decreases under low-light conditions, while point cloud geometric features should receive higher weights, resulting in limited expressive power of fused features and affecting the accuracy of subsequent modeling and planning. Secondly, dynamic obstacle trajectory prediction relies on single-modality or simple time series models, which have large prediction errors for complex motion patterns (such as pedestrians suddenly turning), easily leading to obstacle avoidance failures or path oscillations. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a method for generating navigation paths for robots to solve the problems of difficulty in adapting to environmental changes and large prediction errors after multi-source data fusion.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a method for generating a navigation path for a robot, comprising:
[0008] Real-time acquisition of multi-source data, followed by preprocessing to generate a multi-source feature set;
[0009] The multi-source feature set is processed by an attention mechanism to obtain an environmental feature vector, which is then input into an LSTM network to output the dynamic obstacle trajectory prediction result.
[0010] Construct a 3D environment model and project it as a 2D raster map;
[0011] The A* algorithm is used to process the two-dimensional raster map to obtain a global path point sequence;
[0012] Based on the 3D environment model and the robot's current state, a local cost map is generated using a clustering algorithm;
[0013] Based on the local cost map, the robot's current state, and the global path point sequence, a dynamic window method is used to perform local obstacle avoidance and generate the final executable path.
[0014] As a preferred embodiment of the navigation path generation method for the robot described in this invention, the robot collects multi-source data in real time and performs preprocessing to generate a multi-source feature set, specifically including the following steps:
[0015] Real-time acquisition of multi-source environmental data, followed by denoising and correction processing, and extraction of feature vectors from the multi-source data;
[0016] The extracted multi-source data feature vectors are aligned and concatenated into a unified multi-source feature set.
[0017] As a preferred embodiment of the navigation path generation method for the robot described in this invention, the output dynamic obstacle trajectory prediction result refers to using the attention mechanism of the Transformer model to fuse features from a multi-source feature set to generate an environmental feature vector;
[0018] The environmental feature vectors are input into the trained LSTM network in time series order, and the LSTM network outputs the dynamic obstacle trajectory prediction results.
[0019] As a preferred embodiment of the navigation path generation method for the robot described in this invention, the construction of the three-dimensional environment model refers to segmenting static obstacles and dynamic obstacles by Euclidean clustering of environmental feature vectors, combining environmental feature vector classification clusters, and updating the speed and position of dynamic obstacles by combining the trajectory prediction results of dynamic obstacles.
[0020] The changed areas are updated in each frame, completing the construction of the 3D environment model.
[0021] As a preferred embodiment of the navigation path generation method for the robot described in this invention, the process of obtaining the global path point sequence involves converting a two-dimensional grid map into a node graph, searching for the optimal path from the starting point to the target point using the A* algorithm, generating an initial path point sequence, and optimizing it using angle and distance thresholds to obtain the global path point sequence.
[0022] As a preferred embodiment of the navigation path generation method for the robot described in this invention, the step of generating a local cost map through a clustering algorithm refers to extracting local point cloud data from a three-dimensional environment model with the robot's current position as the center, segmenting static and dynamic obstacles using the DBSCAN clustering algorithm, and projecting the results of dynamic obstacle trajectory prediction to generate a local cost map.
[0023] As a preferred embodiment of the navigation path generation method for the robot described in this invention, the generation of the final executable path refers to generating local path segments through a dynamic window method based on obstacle information from a local cost map, the robot's current state, and a global path point sequence, and selecting a path mode by combining a state-driven switching mechanism to generate the final executable path.
[0024] Secondly, the present invention provides a navigation path generation system for a robot, comprising:
[0025] The acquisition module collects multi-source data in real time, performs preprocessing, and generates a multi-source feature set;
[0026] The prediction module processes the multi-source feature set through an attention mechanism to obtain an environmental feature vector, which is then input into the LSTM network to output the dynamic obstacle trajectory prediction result.
[0027] The projection module constructs a 3D environment model and projects it as a 2D raster map;
[0028] The global path module uses the A* algorithm to process the two-dimensional raster map to obtain a global path point sequence;
[0029] The local map module generates a local cost map based on a 3D environment model and the robot's current state using a clustering algorithm.
[0030] The executable module uses a dynamic window method to perform local obstacle avoidance based on the local cost map, the robot's current state, and the global path point sequence, generating the final executable path.
[0031] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein the computer program, when executed by the processor, implements any step of the robot navigation path generation method as described in the first aspect of the present invention.
[0032] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the navigation path generation method for a robot as described in the first aspect of the present invention.
[0033] The beneficial effects of this invention are as follows: by dynamically assigning weights to the multi-source feature set through the Transformer model, adaptive fusion of multi-modal features and high-precision trajectory prediction are achieved. Furthermore, by utilizing the synergy of attention mechanism and LSTM network, the limitations of traditional fixed-weight fusion and simple prediction models are overcome, significantly improving the environmental adaptability of feature fusion and the accuracy of trajectory prediction, and enhancing the navigation's ability to respond to dynamic obstacles. Attached Figure Description
[0034] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 A flowchart of a method for generating navigation paths for a robot.
[0036] Figure 2 A schematic diagram of a navigation path generation system for a robot.
[0037] Figure 3 A flowchart for projecting a 3D model. Detailed Implementation
[0038] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0039] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0040] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0041] Reference Figure 1As one embodiment of the present invention, this embodiment provides a method for generating a robot's navigation path, comprising the following steps:
[0042] S1 collects multi-source data in real time, performs preprocessing, and generates a multi-source feature set.
[0043] Specifically, the steps include the following:
[0044] S1.1, the robot's real-time acquisition of multi-source data specifically involves: the robot being equipped with multiple sensors, including LiDAR, RGB-D cameras, and ultrasonic sensors. The LiDAR scans the environment to generate 3D point cloud data in the format of a 3D coordinate set; the RGB-D camera simultaneously acquires RGB images, providing semantic information to identify obstacle types, such as pedestrians or vehicles, and acquires depth maps to provide obstacle distance information for determining the relative position of obstacles to the robot; the ultrasonic sensor acquires near-field obstacle data, generating a one-dimensional distance array to supplement near-field perception capabilities and enhance the robot's detection of near-field obstacles. All sensor data is aligned through a timestamp synchronization mechanism, and time deviations are corrected based on Kalman filtering to ensure the temporal consistency of the LiDAR, RGB-D camera, and ultrasonic sensor data.
[0045] Ideally, by acquiring multi-source data in real time using LiDAR, RGB-D cameras, and ultrasonic sensors, a comprehensive perception of the environment is achieved, encompassing geometric, semantic, depth, and near-field distance information. This overcomes the limitations of single-sensor perception and provides a reliable data foundation for subsequent path planning.
[0046] S1.2, Preprocessing stage: Point cloud data is denoised by voxel grid filtering to preserve the accuracy of environmental geometric features; RGB images are distorted based on camera intrinsic matrix to eliminate lens distortion; Depth map is denoised by 3×3 kernel median filtering to preserve obstacle edge information; Near-range obstacle data collected by ultrasonic sensor is smoothed by moving average filtering to eliminate instantaneous noise interference.
[0047] After preprocessing, feature extraction is performed, specifically: 3D point cloud data is input into the PointNet++ network (a 3D point cloud processing neural network based on hierarchical feature extraction) to extract geometric features, such as planes or edges, generating a 512-dimensional feature vector to represent the spatial structure of the environment; RGB images are input into a pre-trained ResNet-50 network to extract semantic features, such as pedestrians or vehicles, generating a 1024-dimensional feature vector; depth maps are input into a U-Net network to generate depth field features, representing the local depth distribution; ultrasonic data is directly mapped to one-dimensional distance features, obtaining ultrasonic distance features, for example, with a dimension of 10, representing the distance to near-field obstacles. The pre-trained ResNet-50 network mentioned here is pre-trained on the ImageNet dataset, which contains images of many categories. The training process uses a convolutional neural network structure, learning low-level and high-level features of the image through multiple layers of residual connections. Training employs stochastic gradient descent optimization, with the optimization objective being to minimize the classification cross-entropy loss, ultimately enabling the ResNet-50 network to achieve the required accuracy on the ImageNet validation set. The pre-trained ResNet-50 network is suitable for various image processing tasks.
[0048] The extracted geometric, semantic, depth field, and ultrasonic distance features are mapped to a unified coordinate system using a transformation matrix based on sensor extrinsic calibration. This eliminates the viewpoint differences between the LiDAR, RGB-D camera, and ultrasonic sensor, ensuring spatial consistency. The aligned feature vectors are then sequentially concatenated into a unified multi-source feature set.
[0049] To further explain, preprocessing and feature extraction were customized to the characteristics of each sensor's data, significantly improving data quality and feature representation capabilities. Preprocessing effectively reduced noise interference and enhanced data reliability. Meanwhile, the multi-source feature set obtained through feature extraction improved the richness and accuracy of environmental information.
[0050] S2 processes the multi-source feature set through an attention mechanism to obtain an environmental feature vector, which is then input into the LSTM network to output the dynamic obstacle trajectory prediction result.
[0051] Specifically, the steps include the following:
[0052] S2.1, the multi-source feature set is processed through an attention mechanism to obtain the environmental feature vector. Specifically, the Transformer model is trained, which contains a 4-layer encoder and 8 attention heads. The Transformer model is used to dynamically allocate weights to the multi-source feature set through the attention mechanism. The training process is as follows: The Transformer model is trained under supervision on a publicly available multimodal dataset, which includes point cloud features, image features, depth features, distance features, and corresponding environmental feature labels. The training process uses stochastic gradient descent optimization, for example, a learning rate of 0.001, a batch size of 32, and approximately 50 epochs. The optimization objective is to minimize the feature fusion loss (such as mean squared error), enabling the Transformer model to learn the correlation and weight allocation rules of each feature. For example, under low light conditions, the weight of RGB semantic features is reduced to 0.2, while the weight of point cloud geometric features is increased to 0.6, thus completing the training of the Transformer model.
[0053] A linear projection layer is used to unify the dimension of each feature to 512 to meet the input requirements of the Transformer model. The multi-source feature set with unified dimension is input into the Transformer model. The attention mechanism calculates the correlation between point cloud geometric features, RGB semantic features, depth field features, and ultrasonic distance features through multi-head attention, generating an attention score, the expression of which is:
[0054]
[0055] Among them, Attention(F i (Q,K) represents the attention score, F i Let d represent the i-th feature vector in the multi-source feature set, Q represent the query vector, K represent the key vector, and d represent the key vector. k The dimension of the key vector is used to normalize the attention score and prevent it from being too large. T represents the transpose.
[0056] Attention scores are converted into attention weights using the Softmax function, reflecting the importance of each feature in the current environment. The expression for this weight is:
[0057] w i =Softmax(Attention(F i ,Q,K));
[0058] Among them, w i represents the weight of the i-th eigenvector, and Softmax represents the Softmax function.
[0059] Finally, we obtain the attention weights of each feature and a multi-source feature set with a unified dimension.
[0060] In the fusion phase, the Transformer model uses attention weights to perform a weighted summation of the feature vectors from the multi-source feature set, generating an intermediate fused feature vector. This intermediate fused feature vector undergoes a non-linear transformation through a feedforward neural network containing two fully connected layers and using the ReLU activation function to enhance feature representation. Finally, a 512-dimensional environment feature vector is generated, with the following expression:
[0061]
[0062] Among them, F env FFN represents the environmental feature vector, FFN represents the feedforward neural network, and N represents the total number of feature vectors in the multi-source feature set.
[0063] The obtained environmental feature vector integrates the spatial structure information of point cloud geometric features, obstacle category information of RGB semantic features, local depth distribution information of depth field features, and near-field distance information of ultrasonic distance features.
[0064] Ideally, the efficient fusion method of the Transformer model overcomes the limitations of traditional fixed-weight fusion, improves the information integrity and adaptability of environmental feature vectors, and provides high-quality input for subsequent trajectory prediction.
[0065] S2.2 To obtain the dynamic obstacle trajectory prediction results, an LSTM model needs to be trained. The LSTM model contains two layers, each with 256 hidden units. The LSTM model receives the environmental feature vector output by the Transformer model, predicts the trajectory of the dynamic obstacle one second in advance, and outputs the position and velocity vector of the dynamic obstacle one second in advance. The training process of the LSTM model is as follows: The LSTM model is pre-trained on a dynamic obstacle trajectory dataset (e.g., pedestrian trajectory data in an autonomous driving scenario). The training process uses stochastic gradient descent optimization, for example, a learning rate of 0.0005, a batch size of 16, and approximately 30 epochs. The optimization objective is to minimize the trajectory prediction error, enabling the LSTM to accurately predict the trajectory of obstacles, such as the movement trend of pedestrians or vehicles. Training is considered complete when the prediction error is less than a specified requirement.
[0066] The trained LSTM model receives environmental feature vectors. The first-layer LSTM unit retains long-term information (such as obstacle movement trends) through a forget gate, updates the current frame information (such as obstacle position changes) through the input gate, and generates a 256-dimensional hidden state through the output gate. The first-layer hidden state is input into the second-layer LSTM unit to further extract time-series patterns. The second layer outputs a 256-dimensional hidden state, representing the motion patterns of dynamic obstacles. For example, the hidden state captures the trend of a pedestrian moving from (x=1, y=2) to (x=1.5, y=2.3).
[0067] The hidden states of the second-layer LSTM unit are mapped to a 6-dimensional output through a fully connected layer, representing the trajectory prediction of the dynamic obstacle one second from now, including 3-dimensional position coordinates (x, y, z) and a 3-dimensional velocity vector (v). x ,v y ,v z For example, predicting a pedestrian's position after 1 second as (x = 1.8, y = 2.5, z = 0) and speed as (v... x =0.3,v y =0.2,v z =0) m / s. The fully connected layer uses a linear activation function to ensure that the output is consistent with the physical quantities of the trajectory.
[0068] The predicted position and velocity vectors are denormalized to restore them to the true physical scale, for example, mapping positions in the range [-1, 1] back to [-10, 10] meters. The accuracy of the prediction results is verified, for example, by comparing them with the actual obstacle trajectory; the error is less than 0.1 meters. If the prediction deviation is large (e.g., > 0.1 meters), reprocessing or updating the environmental feature vector is triggered. The prediction results are directly used for subsequent path planning, for example, avoiding predicted pedestrian positions (x = 1.8, y = 2.5). The obtained dynamic obstacle trajectory prediction results contain the position and velocity vectors of the obstacles.
[0069] Furthermore, by combining the Transformer model and the Long Short-Term Memory (LSTM) network, strong adaptability to dynamic environments is achieved. The Transformer model's attention mechanism dynamically adjusts feature weights to adapt to environmental changes; for example, in foggy or low-light conditions, it prioritizes the use of point cloud geometric features and ultrasonic distance features to ensure the accuracy of environmental feature vectors. The LTM network predicts future trajectories through time-series analysis, adapting to rapid changes in dynamic obstacles. This dual mechanism enables the robot to accurately perceive and predict obstacle movement in complex dynamic environments (such as moving pedestrians in indoor warehouses or vehicles on outdoor roads) and supports real-time path adjustment.
[0070] S3 constructs a 3D environment model and projects it as a 2D raster map.
[0071] Please see Figure 3 Specifically, it includes the following steps:
[0072] S3.1 The process of constructing a 3D environment model using environmental feature vectors and dynamic obstacle trajectory prediction results is as follows: the OctoMap framework is used to store static obstacles (position coordinates), dynamic obstacles (position and velocity vectors), and free space (passable area).
[0073] The point cloud data is generated by extracting 3D coordinate information from the point cloud geometric features in the environmental feature vector. Specifically, the point cloud geometric feature sub-vectors are separated from the environmental feature vector, and a fully connected decoding network is used to map the point cloud geometric feature sub-vectors into 3D coordinate points. Voxel mesh filtering is then applied to the 3D coordinate points to obtain the point cloud data. A classification threshold (default 0.2 meters, customizable) is determined based on the spatial resolution of the point cloud data, obstacle size, and scene characteristics. Euclidean clustering is then used to segment static and dynamic obstacles in the 512-dimensional environmental feature vector according to the classification threshold. The expression for this threshold is:
[0074]
[0075] Among them, C k Let s represent the k-th cluster, which represents an obstacle. j Let represent the j-th point in the point cloud dataset, which is a single point in the point cloud dataset. Let P represent the point cloud dataset, which contains all point cloud points. a Represents cluster C k The a-th point in the diagram, where θ represents the classification threshold.
[0076] The segmentation process calculates the distance between points based on the 3D coordinates of the point cloud data. Points with a distance less than a classification threshold are grouped into the same cluster. RGB semantic features (e.g., pedestrian labels) are used to classify clusters as static obstacles (e.g., planes) or dynamic obstacles (e.g., pedestrians). Velocities are assigned to dynamic obstacles based on the velocity vectors predicted by their trajectories. The 3D environment model detects changed areas by comparing the point cloud data of the current frame with that of the previous frame. It then updates the changed areas around the robot, such as the location of newly added pedestrians, based on the dynamic obstacle trajectory prediction results. The update process only processes changed areas in the point cloud data; for example, it detects newly added or moved point clusters by comparing the differences between the point cloud data of the current frame and the previous frame.
[0077] Furthermore, environmental feature vectors provide rich information for constructing the 3D environment model, and Euclidean clustering distinguishes between dynamic and static obstacles. This high-precision modeling ensures that the 3D environment model accurately represents complex environments (such as shelves and pedestrians in an indoor warehouse), providing a reliable foundation for subsequent path planning. Moreover, the 3D environment model updates only the changing parts around the robot each frame; this partitioned update strategy significantly reduces computational load.
[0078] S3.2, Projection Phase: The 3D environment model is projected into a 2D grid map. The projection process retains the position information of static and dynamic obstacles. Static obstacles are mapped as occupied units, free space is mapped as passable units, and the predicted positions of dynamic obstacles are marked as high-cost units.
[0079] The 2D grid map employs a multi-resolution strategy. For example, the area near the starting and target points (e.g., within 5 meters) is designated as a high-resolution region using a 0.2-meter resolution; other areas are designated as low-resolution regions using a 1-meter resolution, reducing computational load. The robot's current position is determined by fusing data from the inertial measurement unit and wheel odometry, and an extended Kalman filter is used to update the position through state prediction and observation, serving as the starting coordinates. The target point is specified by the user, for example, using 2D coordinates (x=15, y=10). The 2D grid map is saved, containing occupancy cells for static obstacles, high-cost cells representing predicted dynamic obstacle areas, traversable cells in free space, and the coordinates of the starting and target points.
[0080] S4. The A* algorithm is used to process the two-dimensional raster map to obtain the global path point sequence.
[0081] Specifically, the steps include the following:
[0082] In step S4.1, the 2D raster map is converted into a node graph. The A* algorithm initializes open and closed lists to store nodes to be explored and nodes already explored. The open list initially contains the starting node, and the closed list is empty. Each node maintains three cost values: actual cost, heuristic cost, and total cost. The actual cost represents the path length from the starting point to the current node and is initially 0. The heuristic cost is calculated using Euclidean distance, such as the distance from the starting point to the target point.
[0083] The A* algorithm operates on a 2D raster map, searching for a path from the starting point to the target point, prioritizing routes that are short and far from predicted static and dynamic obstacles. The search process iteratively executes the following steps: First, select the node with the lowest total cost from the open list as the current node, and move the current node to the closed list, indicating it has been explored. If the current node is the target point, the search terminates, and the path generation point sequence is traced back. Then, neighbor nodes are generated for the current node. In high-resolution areas, denser neighbor nodes are generated, such as one node every 0.2 meters; in low-resolution areas, sparser neighbor nodes are generated, such as one node every 1 meter. The cost is calculated for each neighboring node. The calculation process is as follows: The A* algorithm calculates the single-step movement cost, called the safe distance cost, based on the node type of the 2D grid map (occupied cells of static obstacles, high-cost cells of predicted dynamic obstacle areas, and passable cells of free space). Next, the actual cost is calculated, which is the cumulative path cost from the starting point to the current node, obtained by accumulating the safe distance costs for each step. Then, the heuristic cost is calculated by calculating the Euclidean distance from the neighboring node to the target point. Finally, the total cost is calculated by adding the heuristic cost to the actual cost. If a neighboring node is not in the open or closed list, it is added to the open list; if it is already in the open list and the actual cost of the new path is lower, the actual cost and the parent node are updated.
[0084] S4.2 The search runs on a multi-resolution raster map. High-resolution areas undergo a fine-grained search, examining more neighboring nodes (e.g., one node every 0.2 meters) to ensure path accuracy; low-resolution areas undergo a fast search to reduce the number of neighboring nodes. After the search is complete, the A* algorithm traces the parent node relationships from the target point to the starting point, generating an initial path point sequence.
[0085] Angle thresholds are set based on three aspects: path smoothness, computational efficiency, and scene adaptation (the default is 30 degrees, which can be customized according to needs); distance thresholds are set based on experimental results, and the included angle of all three consecutive nodes in the initial path point sequence is calculated. If the included angle is less than the angle threshold and the Euclidean distance is less than the distance threshold, the middle node of the three nodes is removed to ensure that the path is simple and meets the minimum distance requirement, thus completing the optimization of the initial path point sequence and obtaining the global path point sequence.
[0086] To further explain, by optimizing the initial path point sequence and eliminating redundant points, the simplicity and execution efficiency of the global path point sequence are improved.
[0087] S5 generates a local cost map based on a 3D environment model and the robot's current state using a clustering algorithm.
[0088] Specifically, the steps include the following:
[0089] The robot's current state includes its position, velocity, and orientation. Using the robot's current position as the center, local point cloud data is extracted from the 3D environment model. This local point cloud data includes the positions of static and dynamic obstacles, as well as the predicted trajectories of dynamic obstacles.
[0090] A point cloud density threshold is set based on environmental characteristics (default 10,000 points / cubic meter, customizable according to needs), and a minimum cluster threshold is set based on point cloud density (default 50 points, customizable according to needs). The DBSCAN clustering algorithm uses the point cloud density threshold and the minimum cluster threshold to segment local point clouds and detect dynamic and static obstacles. Specifically: First, the distance between points is calculated. For each point, its Euclidean distance to neighboring points is calculated. If the Euclidean distance is less than the point cloud density threshold, it is marked as a neighbor node. Then, density connection is performed: points with a number of neighbor nodes greater than or equal to the minimum cluster threshold are set as core points. Clusters are expanded from the core points, connecting all density-reachable points (where the Euclidean distance is less than the point cloud density threshold). Finally, cluster classification is performed: clusters are classified by combining the RGB semantic features (e.g., pedestrian labels) of the 512-dimensional environmental feature vector. For example, pedestrian point clouds are marked as dynamic obstacles, and wall point clouds are marked as static obstacles. The classification results are stored as cluster labels. Each cluster contains a center location and the number of points, where the number of points refers to the total number of 3D coordinate points within the cluster. The dynamic obstacle clusters are combined with the dynamic obstacle trajectory prediction results to update the predicted position of the clusters. Specifically, the cluster center position is replaced according to the dynamic obstacle trajectory prediction results, and the updated cluster center, number of points and velocity vector are marked in the 3D environment model. This update is performed once per frame to adapt to real-time navigation.
[0091] The local point cloud is projected into a 2D local cost map, and the robot's current state (position and orientation) is considered during the generation of the 2D local cost map to ensure that the map center and orientation are aligned. Specifically, the map center is set to the robot's current position, and the map orientation is aligned with the robot's direction. The point cloud projection is adjusted by rotating the coordinate system. The local cost map is updated every frame, synchronized with the 3D environment model, and only processes the changed areas of the point cloud. The update content includes change detection, local clustering, local projection, and state synchronization.
[0092] To further explain, the updates of the local cost map per frame can support high-frequency environmental awareness, adapt to dynamic environments (such as warehouse scenarios with frequent pedestrian movement), and improve the response speed and safety of local path planning to dynamic obstacles.
[0093] S6. Based on the local cost map, the robot's current state, and the global path point sequence, the dynamic window method is used to perform local obstacle avoidance and generate the final executable path.
[0094] Specifically, the steps include the following:
[0095] S6.1 uses a dynamic window method to generate local paths. Specifically, the dynamic window method searches for the optimal speed command in the speed space. The speed space is defined as the range of linear velocity and the range of angular velocity. For each speed pair, the dynamic window method simulates the motion trajectory within 0.5 seconds, generating local path segments. The trajectory is checked for collisions on the local cost map. Orientation score, speed score, obstacle distance score, and global path consistency score are defined as optimization objectives and weighted accordingly. The orientation score measures the cosine of the angle between the trajectory's end orientation and the target direction; the speed score prioritizes higher linear velocities; the obstacle distance score calculates the distance from the trajectory to the nearest obstacle; and the global path consistency score calculates the distance from the trajectory's end to the nearest point on the global path, ensuring consistency with the global plan. If the local cost map shows no obstacle conflicts, the local path directly follows the global path point sequence.
[0096] S6.2 uses a state-driven switching mechanism based on environmental complexity to determine whether to use a local path segment or track a global path point sequence. Specifically, the environmental complexity is calculated using the following formula:
[0097]
[0098] Where H represents environmental complexity, B represents the number of obstacle points, U represents the area of the local cost map, and Z represents the number of dynamic obstacles.
[0099] Set the environment complexity threshold according to the task requirements (the default value is 100, which can be customized according to the requirements). If the environment complexity is greater than the environment complexity threshold, switch to local obstacle avoidance mode; otherwise, continue to track the global path.
[0100] The switching mechanism includes three states: global tracking, local obstacle avoidance, and path recovery. In global tracking, the robot directly follows the global path point sequence. In local obstacle avoidance, local path segments are generated using a dynamic window method. Path recovery is triggered when the local path deviates from the global path point sequence by more than 0.5 meters. Once triggered, a transition path is generated within the local cost map using a fast random tree algorithm, connecting the robot's current position to a nearby global path point to reconnect to the global path. The switching mechanism generates the final path point sequence, which is then transmitted to the motion controller, which generates speed commands.
[0101] Please see Figure 2 This embodiment also provides a navigation path generation system for a robot, including:
[0102] The acquisition module collects multi-source data in real time, performs preprocessing, and generates a multi-source feature set;
[0103] The prediction module processes the multi-source feature set through an attention mechanism to obtain an environmental feature vector, which is then input into the LSTM network to output the dynamic obstacle trajectory prediction result.
[0104] The projection module constructs a 3D environment model and projects it as a 2D raster map;
[0105] The global path module uses the A* algorithm to process the two-dimensional raster map to obtain a global path point sequence;
[0106] The local map module generates a local cost map based on the 3D environment model and the robot's current state using a clustering algorithm.
[0107] The executable module uses a dynamic window method to perform local obstacle avoidance based on the local cost map, the robot's current state, and the global path point sequence, generating the final executable path.
[0108] This embodiment also provides a computer device, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the robot navigation path generation method proposed in the above embodiment.
[0109] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0110] This embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the method for generating a robot's navigation path as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0111] In summary, this invention achieves adaptive fusion of multimodal features and high-precision trajectory prediction by dynamically assigning weights to a multi-source feature set using the Transformer model. Furthermore, it overcomes the limitations of traditional fixed-weight fusion and simple prediction models by utilizing the synergy of attention mechanisms and LSTM networks, significantly improving the environmental adaptability of feature fusion and the accuracy of trajectory prediction, and enhancing the navigation's responsiveness to dynamic obstacles.
[0112] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for generating a navigation path for a robot, characterized in that: include: Real-time acquisition of multi-source data, followed by preprocessing to generate a multi-source feature set; The multi-source feature set is processed by an attention mechanism to obtain an environmental feature vector, which is then input into an LSTM network to output the dynamic obstacle trajectory prediction result. Construct a 3D environment model and project it as a 2D raster map; Use A The algorithm processes a two-dimensional raster map to obtain a global pathpoint sequence; Based on the 3D environment model and the robot's current state, a local cost map is generated using a clustering algorithm; The robot's current state includes its position, speed, and orientation; The generation of a local cost map using a clustering algorithm refers to extracting local point cloud data from a 3D environment model centered on the robot's current position, segmenting static and dynamic obstacles using the DBSCAN clustering algorithm, and combining the dynamic obstacle trajectory prediction results to project and generate a local cost map. Specifically: The local point cloud data includes the positions of static and dynamic obstacles, as well as the predicted trajectories of dynamic obstacles; A point cloud density threshold is set based on environmental characteristics, and a minimum cluster threshold is set based on the point cloud density. The DBSCAN clustering algorithm uses the point cloud density threshold and the minimum cluster threshold to segment the local point cloud and detect dynamic and static obstacles. Specifically, the distance between points is first calculated. For each point, its Euclidean distance to its neighboring points is calculated. If the Euclidean distance is less than the point cloud density threshold, it is marked as a neighbor node. Then, density connection is performed: points with a number of neighbor nodes greater than or equal to the minimum cluster threshold are set as core points. Clusters are expanded from the core points, connecting all density-reachable points. Finally, cluster classification is performed: clusters are classified using the RGB semantic features of the 512-dimensional environmental feature vector. The classification results are stored as cluster labels. Each cluster contains a center position and the number of points. The number of points refers to the total number of three-dimensional coordinate points in the cluster. Dynamic obstacle clusters are updated with the predicted position of the cluster based on the dynamic obstacle trajectory prediction results. Specifically, the cluster center position is replaced according to the dynamic obstacle trajectory prediction results, and the updated cluster center, number of points, and velocity vector are marked in the three-dimensional environment model. This update is performed once per frame. The local point cloud is projected into a two-dimensional local cost map, and the robot's current state is considered when the two-dimensional local cost map is generated to ensure that the map center and orientation are aligned. Specifically, the map center is set to the robot's current position, the map orientation is aligned with the robot's direction, the point cloud projection is adjusted by rotating the coordinate system, the local cost map is updated every frame and synchronized with the three-dimensional environment model, only the point cloud change area is processed, and the update content includes change detection, local clustering, local projection and state synchronization. Based on the local cost map, the robot's current state, and the global path point sequence, a dynamic window method is used for local obstacle avoidance to generate the final executable path, specifically: The environmental complexity is used to employ a state-driven switching mechanism to determine whether to use a local path segment or track a global path point sequence. Specifically, the environmental complexity is calculated using the following formula: ; in, Indicates environmental complexity. Indicates the number of obstacles. This represents the area of the local cost map. Indicates the number of dynamic obstacles; Set an environmental complexity threshold based on task requirements. If the environmental complexity exceeds the threshold, switch to local obstacle avoidance mode; otherwise, continue tracking the global path. The switching mechanism includes three states: global tracking, local obstacle avoidance, and path recovery. In global tracking, the system directly follows the global path point sequence. In local obstacle avoidance, local path segments are generated using a dynamic window method. Path recovery is triggered when the local path deviates from the global path point sequence by more than 0.5 meters. Once triggered, path recovery generates a transition path in the local cost map using a fast random tree algorithm, from the robot's current position to a nearby global path point to reconnect the global path. The final path point sequence is generated through the switching mechanism and transmitted to the motion controller, which then generates speed commands.
2. The robot navigation path generation method as described in claim 1, characterized in that: Real-time acquisition of multi-source data, followed by preprocessing to generate a multi-source feature set, specifically includes the following steps: Real-time acquisition of multi-source environmental data, followed by denoising and correction processing, and extraction of feature vectors from the multi-source data; The extracted multi-source data feature vectors are aligned and concatenated into a unified multi-source feature set.
3. The robot navigation path generation method as described in claim 2, characterized in that: The output dynamic obstacle trajectory prediction result refers to the use of the attention mechanism of the Transformer model to fuse features from a multi-source feature set to generate an environmental feature vector; The environmental feature vectors are input into the trained LSTM network in time series order, and the LSTM network outputs the dynamic obstacle trajectory prediction results.
4. The robot navigation path generation method as described in claim 3, characterized in that: The construction of the three-dimensional environment model refers to segmenting static and dynamic obstacles by Euclidean clustering of environmental feature vectors, combining environmental feature vector classification clusters, and updating the speed and position of dynamic obstacles by combining the trajectory prediction results of dynamic obstacles. The changed areas are updated in each frame, completing the construction of the 3D environment model.
5. The robot navigation path generation method as described in claim 4, characterized in that: Obtaining the global pathpoint sequence refers to converting a two-dimensional raster map into a node graph, through A... The algorithm searches for the optimal path from the starting point to the target point, generates an initial path point sequence, and optimizes it using angle and distance thresholds to obtain a global path point sequence.
6. A robot navigation path generation system, based on the robot navigation path generation method according to any one of claims 1 to 5, characterized in that: include: The acquisition module collects multi-source data in real time, performs preprocessing, and generates a multi-source feature set. The prediction module processes the multi-source feature set through an attention mechanism to obtain an environmental feature vector, which is then input into the LSTM network to output the dynamic obstacle trajectory prediction result. The projection module constructs a 3D environment model and projects it as a 2D raster map; The global path module uses A The algorithm processes a two-dimensional raster map to obtain a global pathpoint sequence; The local map module generates a local cost map based on a 3D environment model and the robot's current state using a clustering algorithm. The executable module uses a dynamic window method to perform local obstacle avoidance based on the local cost map, the robot's current state, and the global path point sequence, generating the final executable path.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the navigation path generation method for the robot according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the navigation path generation method for the robot according to any one of claims 1 to 5.
Citation Information
Patent Citations
Campus garbage picking robot
CN120056104A