Motion planning method and device, computer equipment and readable storage medium

By acquiring historical trajectories on mobile devices and performing multiple random samplings and weighted fusions, the problem of local optimization in traditional methods is solved, achieving efficient and stable motion planning in complex terrain.

CN121764082APending Publication Date: 2026-03-31SHENZHEN PUDU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Traditional motion planning methods are prone to getting stuck in local optimization and struggle to plan reasonable motion behaviors for mobile devices in complex terrain, resulting in low planning efficiency.

Method used

By acquiring the initial predicted parameter trajectory at historical time points, multiple random samplings are performed to generate sampled predicted parameter trajectories. Combined with equipment status trajectory information and cost information, weights are calculated and fused to obtain the target predicted parameter trajectory, thereby optimizing motion planning.

Benefits of technology

It improves the efficiency and stability of motion planning for self-moving devices in complex terrain, enhances the robustness and smoothness of planning, reduces noise, and ensures more reliable motion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121764082A_ABST
    Figure CN121764082A_ABST
Patent Text Reader

Abstract

The invention relates to a motion planning method and device, computer equipment and a readable storage medium. The method comprises the following steps: acquiring an initial prediction parameter track corresponding to a historical time point; performing multiple times of random sampling on the motion expectation state of the local controller at each moment in the initial prediction parameter trajectory to obtain a plurality of sampling prediction parameter trajectories; obtaining the equipment motion state of the self-moving equipment corresponding to the current time point, and obtaining multiple pieces of equipment state track information corresponding to the equipment motion state based on each sampling prediction parameter track; and obtaining a target prediction parameter trajectory corresponding to the current time point based on the weight information corresponding to each piece of equipment state trajectory information, so that the self-moving equipment controls each local controller to perform corresponding motion according to the target prediction parameter trajectory. By adopting the method, the reasonable planning of the motion path under the complex terrain can be realized, and the efficiency of planning the motion path of the self-moving equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of mobile device technology, and in particular to a motion planning method, apparatus, computer device, computer-readable storage medium, and computer program product. Background Technology

[0002] With the development of technology in the field of self-moving devices, wheeled-legged robot technology has emerged, which combines the advantages of wheeled and legged robots. This technology endows robots with superior all-terrain mobility, enabling them not only to move efficiently on flat ground like wheeled robots, but also to perform complex actions such as climbing slopes, ascending stairs, jumping off platforms, and moving on uneven surfaces. This greatly enhanced capability presents new challenges to the autonomous motion planning of robots.

[0003] However, in traditional technologies, motion planning is mainly carried out through a two-stage approach of front-end path search and back-end trajectory optimization. However, this approach is prone to getting stuck in local optima, making it difficult for self-moving devices to plan reasonable motion behavior in the presence of complex terrain. Summary of the Invention

[0004] Therefore, it is necessary to provide a motion planning method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can realize the rational planning of movement paths under complex terrain and improve the efficiency of movement path planning for mobile devices, in order to address the above-mentioned technical problems.

[0005] In a first aspect, this application provides a motion planning method, including:

[0006] Obtain the initial prediction parameter trajectory corresponding to the historical time point. The initial prediction parameter trajectory includes the expected motion state of the local controller at each time point starting from the historical time point, which is used to control the motion of the self-moving device.

[0007] The motion expectation state of the local controller at each time step in the initial predicted parameter trajectory is randomly sampled multiple times to obtain multiple sampled predicted parameter trajectories;

[0008] Obtain the device motion state of the self-moving device at the current time point, and obtain multiple device state trajectory information corresponding to the device motion state based on the trajectory of each sampled prediction parameter.

[0009] Obtain the target state of the self-moving device at the current time point, obtain the cost information of the trajectory information of each device state based on the target state, and obtain the weight information of the corresponding sampling prediction parameter trajectory based on the cost information of each device state.

[0010] Based on the trajectory of each sampled prediction parameter and the corresponding weight information, the trajectory of the target prediction parameter at the current time point is obtained, so that the self-moving device controls each local controller to perform the corresponding movement according to the trajectory of the target prediction parameter.

[0011] Secondly, this application also provides a motion planning device, comprising:

[0012] The acquisition module is used to acquire the initial prediction parameter trajectory corresponding to the historical time point. The initial prediction parameter trajectory includes the expected motion state of the local controller at each time point starting from the historical time point, which is used to control the motion of the self-moving device.

[0013] The sampling module is used to randomly sample the motion expectation state of the local controller at each time step in the initial predicted parameter trajectory multiple times to obtain multiple sampled predicted parameter trajectories.

[0014] The simulation module is used to obtain the device motion state of the self-moving device at the current time point, and obtain multiple device state trajectory information corresponding to the device motion state based on the trajectory of each sampled prediction parameter.

[0015] The cost module is used to obtain the target state of the self-moving device at the current time point, obtain the cost information of the trajectory information of each device state based on the target state, and obtain the weight information of the corresponding sampling prediction parameter trajectory based on the cost information of each device state.

[0016] The determination module is used to obtain the target prediction parameter trajectory at the current time point based on the trajectory of each sampled prediction parameter and the corresponding weight information, so that the self-moving device controls each local controller to perform corresponding movements according to the target prediction parameter trajectory.

[0017] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0018] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method embodiments.

[0019] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0020] The aforementioned motion planning method, apparatus, computer equipment, computer-readable storage medium, and computer program product, guided by the initial predicted parameter trajectory corresponding to historical time points, randomly sample the motion expectation state of the local controller at each moment in the initial predicted parameter trajectory to obtain multiple sampled predicted parameter trajectories. This shifts the focus of planning from "how to execute" to "intent decision-making." Compared to handling the complex physical details at the underlying level, this sampling method of planning the motion expectation state of the local controller in the local target space enables the self-moving device to switch between different postures and behaviors, thereby achieving all-terrain motion planning and improving planning efficiency. In addition, by calculating the weight information corresponding to the device state trajectory information of each sampled predicted parameter trajectory, and based on each sampled predicted parameter trajectory and its corresponding weight information, the target predicted parameter trajectory corresponding to the current time point is obtained. This combines the advantages of all sampled trajectories, improving the smoothness and robustness of the motion planning trajectory, reducing the defects and noise caused by using a single trajectory, and making the motion of the self-moving device more stable and reliable in complex terrain. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a diagram illustrating the application environment of the motion planning method in one embodiment;

[0023] Figure 2 This is a flowchart illustrating the motion planning method in one embodiment;

[0024] Figure 3 This is a structural block diagram of the motion planning device in one embodiment;

[0025] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0027] The motion planning method provided in this application embodiment can be applied to, for example, Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located on the cloud or other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Terminal 102 can also be a robot. The robot can be any self-moving device capable of executing motion planning methods. Examples include: wheeled robots, cleaning robots, sweeping robots, floor scrubbing robots, vacuuming robots, delivery robots, following robots, service robots, smart shopping carts, etc. It is understood that the robot can be used independently to execute the motion planning method provided in the embodiments of this application, or it can cooperate with the server 104 to implement the motion planning method provided in the embodiments of this application. The server can be an independent physical server or a service node in a blockchain system. The service nodes in this blockchain system form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). Furthermore, the server can also be a server cluster composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The robot and the server 104 can connect via Bluetooth, USB (Universal Serial Bus), or network communication methods; this application does not impose any restrictions on these methods.

[0028] In one exemplary embodiment, such as Figure 2 As shown, a motion planning method is provided. This embodiment uses the application of this method to a self-moving device (e.g., a wheeled robot) as an example for illustration, including the following steps S202 to S210. Wherein:

[0029] S202, obtain the trajectory of the initial prediction parameters corresponding to the historical time points.

[0030] In this context, a historical time point is a point in time prior to the current time point. During the autonomous movement of a self-moving device, the device can capture images of its surroundings to plan its motion based on the captured image frames. In this case, a historical time point could be, for example, the time point corresponding to the previous image frame.

[0031] The initial predicted parameter trajectory refers to a baseline trajectory generated based on historical data acquired by the self-moving device at a historical time point. At that historical time point, the self-moving device executes corresponding movements according to the initial predicted parameter trajectory. The initial predicted parameter trajectory includes the expected motion states of the self-moving device corresponding to the local controllers at various moments starting from the historical time point. A local controller is a control unit that controls specific parts or behaviors of the self-moving device. For example, the leg joint drive, trunk posture adjustment, and foot pressure feedback adjustment functions of a multi-legged robot are independently controlled by different local controllers, which work together to achieve stable walking, turning, or obstacle-crossing movements. The expected motion state refers to the state that the local controller is expected to achieve at a certain moment. The expected motion state includes, for example, the expected position, expected orientation, and expected speed. In other words, the expected motion state indicates the expected position, orientation, and speed that the local controllers are expected to control the self-moving device to achieve.

[0032] For example, the initial predicted parameter trajectory is in the form of ((t0, p0), (t1, p1), …, (t1, p1)). Here, t0, t1, …, tn represent each time step, and p0, p1, …, pn are parameter vectors indicating the local controller at each time step and the desired motion state corresponding to that local controller. In other words, the parameter vector indicates which local controller controls the self-moving device at that time step and, through that local controller, what desired motion state the self-moving device achieves. For example, the parameter vector could be (k, q), where k indicates the local controller and q indicates the corresponding desired motion state (e.g., the local controller is an acceleration controller, and the desired motion state is acceleration to 10 cm / s).

[0033] S204, randomly sample the motion expectation state of the local controller at each time step in the initial predicted parameter trajectory multiple times to obtain multiple sampled predicted parameter trajectories.

[0034] The sampled predicted trajectory represents the various possibilities of the self-moving device's movement over a future period. When performing random sampling, either a Gaussian or non-Gaussian distribution can be used. Non-Gaussian distributions, such as uniform distributions or Gaussian mixture models, increase the diversity of exploration and reduce the possibility of getting trapped in local optima.

[0035] For example, after obtaining the initial predicted parameter trajectory corresponding to the historical time point at the current time point, sampling is performed on each moment in the initial predicted parameter trajectory to obtain the corresponding sampling moments. Then, sampling is performed on each parameter vector in the initial predicted parameter trajectory (i.e., sampling of each local controller and each desired motion state) to obtain the sampled local controller and sampled desired motion state corresponding to each sampling moment. In this way, a sampled predicted parameter trajectory is obtained. The above steps can then be repeated to obtain multiple sampled predicted parameter trajectories.

[0036] It is understandable that the multiple sampled predicted parameter trajectories obtained are used to determine the target predicted parameter trajectory of the self-moving device at the current time point, that is, to update the initial predicted parameter trajectory corresponding to the historical time points. In order to reduce the possibility of losing the optimal solution due to sampling, the initial predicted parameter trajectory is added to the multiple sampled predicted parameter trajectories, so that when the target predicted parameter trajectory is obtained based on each sampled predicted parameter trajectory, the previously obtained optimal solution (i.e., the initial predicted parameter trajectory) can be taken into account, thereby improving the reliability of the target predicted parameter trajectory.

[0037] S206, obtain the device motion state of the self-moving device corresponding to the current time point, and obtain multiple device state trajectory information corresponding to the device motion state based on the trajectory of each sampled prediction parameter.

[0038] The device motion state refers to the actual physical state of the self-moving device at the current point in time, such as its actual position, orientation, speed, and angular velocity. The device state trajectory information is the trajectory of changes in the device motion state obtained by simulating the sampled predicted parameter trajectory. In other words, the device state trajectory information is the sequence of changes in the device motion state over time, assuming the device is running a certain sampled predicted parameter trajectory. It can be understood that the device state trajectory information is a trajectory obtained through simulation and deduction.

[0039] For example, one sampled prediction parameter trajectory corresponds to one device state trajectory information. The device motion state is updated according to the local controller and motion expectation state at each time step in the sampled prediction parameter trajectory to obtain the updated device motion state at each time step, thereby obtaining the corresponding device state trajectory information.

[0040] In some embodiments, the corresponding local controllers are identified by numbers in the sampled prediction parameter trajectory. If Gaussian noise is used to randomly sample the local controller numbers, the sampled local controller numbers may be non-integer continuous values. In this case, the local controller numbers in the sampled prediction parameter trajectory can be preprocessed (e.g., rounded, or subject to value restrictions) to ensure that the numbers of each local controller in the preprocessed sampled prediction parameter trajectory are integers, so as to accurately locate the corresponding local controller during simulation.

[0041] S208, obtain the target state of the self-moving device at the current time point, obtain the cost information of the state trajectory information of each device based on the target state, and obtain the weight information of the corresponding sampling prediction parameter trajectory based on the cost information of the state trajectory information of each device.

[0042] The target state refers to the desired final state of the self-moving device, typically including target position and target posture. The target state can be determined based on the object the self-moving device is following, or based on the initially set target position. Cost information is a quantitative indicator used to evaluate the quality of the device state trajectory information. A lower cost indicates a better trajectory (e.g., closer to the target, safer, smoother). Weight information is calculated based on the cost information and represents the importance or likelihood of the corresponding device state trajectory information being adopted. Generally, the lower the cost, the higher the weight, meaning a higher probability of it being adopted as the target prediction parameter trajectory.

[0043] For example, for each device state trajectory information, the various state elements in the device state trajectory information (i.e., intermediate device states in subsequent content) can be compared with the target state, and cost information can be determined based on the corresponding comparison results. In some embodiments, a security assessment or smoothing assessment can also be performed on the device state trajectory information itself to obtain the corresponding cost information. If the cost information includes multiple costs, a corresponding configuration weight can be set for each cost. Then, the various costs can be weighted based on the configuration weights to obtain the final cost information. Afterward, the weight information corresponding to the device state trajectory information can be determined based on the cost information corresponding to the device state trajectory information. The cost information and weight information are inversely proportional; that is, the lower the cost, the higher the weight; and the higher the cost, the lower the weight.

[0044] S210: Based on the trajectory of each sampled prediction parameter and the corresponding weight information, the trajectory of the target prediction parameter at the current time point is obtained, so that the self-moving device controls each local controller to perform the corresponding movement according to the trajectory of the target prediction parameter.

[0045] The target predicted parameter trajectory refers to the final optimized trajectory obtained by fusing (e.g., weighted averaging) all sampled predicted parameter trajectories and their weights. The mobile device can move according to this target predicted parameter trajectory starting from the current time point until the target predicted parameter trajectory is updated, and then continue moving according to the updated target predicted parameter trajectory. It can be understood that for the next time point, the target predicted parameter trajectory corresponding to the current time point is the initial predicted parameter trajectory for the next time point. At the next time point, by executing the above steps, the initial predicted parameter trajectory for the next time point is updated to obtain the target predicted parameter trajectory for the next time point.

[0046] For example, each sampled predicted parameter trajectory includes multiple predicted trajectory elements, and each predicted trajectory element includes the corresponding local controller and the corresponding motion expectation state at the corresponding sampling time. When fusing multiple sampled predicted parameter trajectories, the corresponding predicted trajectory elements in each sampled predicted parameter trajectory can be fused. That is, the first predicted trajectory element in each sampled predicted parameter trajectory is fused to obtain the first fused element, the second predicted trajectory element in each sampled predicted parameter trajectory is fused to obtain the second fused element, and so on, until the Nth predicted trajectory element in each sampled predicted parameter trajectory is fused to obtain the Nth fused element. Then, the first fused element to the Nth fused element are combined to form the target predicted parameter trajectory, so that the obtained target predicted parameter trajectory combines the low-cost fused elements in each sampled predicted parameter trajectory, i.e., the low-cost motion expectation states, to obtain the low-cost target predicted parameter trajectory.

[0047] In this embodiment, firstly, an initial predicted parameter trajectory corresponding to a historical time point is obtained. This trajectory includes the local controller expected to operate at each time point and the expected motion state that can be achieved through the local controller. Next, the expected motion state and the local controller are randomly sampled to generate a large number of sampled predicted parameter trajectories exploring different controller combinations and motion commands. Then, for each sampled predicted parameter trajectory, a chained forward simulation method is used to iteratively calculate the complete device state trajectory information, starting from the current device motion state. During the evaluation phase, a first cost based on the task objective and / or a second cost based on the environmental terrain can be calculated, and the weight information of each sampled predicted parameter trajectory is calculated by combining preset coefficients. Finally, all sampled predicted parameter trajectories are weighted and fused to obtain the final target predicted parameter trajectory.

[0048] In some embodiments, to improve the reliability of the target predicted parameter trajectory, the target predicted parameter trajectory can be optimized. For example, the initial parameter trajectory is updated based on the target predicted parameter trajectory, and then the above steps are repeated based on the updated initial parameter trajectory to obtain the final optimized target predicted parameter trajectory corresponding to the current time. The number of times the above steps are repeated can be preset and is not limited here.

[0049] In this embodiment, a large number of candidate trajectories are generated through random sampling, and cost evaluation and weighted fusion are combined to effectively cope with environmental uncertainties and model errors, greatly enhancing the robustness and adaptability of motion planning. Furthermore, planning is re-performed at each time point based on the latest device and target states, enabling the device to dynamically adapt to environmental changes and task adjustments, thereby generating high-quality motion trajectories that better meet the needs of complex real-world scenarios.

[0050] In some embodiments, the following describes how to perform multiple random samplings of the motion expectation state of the local controller at each time step in the initial predicted parameter trajectory to obtain multiple sampled predicted parameter trajectories: Based on each time step in the initial predicted parameter trajectory, obtain each sampling time step; perform multiple random samplings of the local controller number and the corresponding motion expectation state at each time step to obtain multiple sampling numbers and multiple sampled motion expectation states corresponding to each sampling time step, so as to obtain multiple sampled predicted parameter trajectories corresponding to the predicted parameter trajectory.

[0051] In this embodiment, the initial predicted parameter trajectory includes the numbers of each local controller corresponding to each moment starting from a historical time point, and the expected motion state corresponding to each local controller. Here, the number refers to a unique identifier assigned to each local controller. Different local controllers are distinguished and invoked through these numbers.

[0052] For example, based on each moment in the initial predicted parameter trajectory, corresponding sampling moments are determined. For instance, the moment closest to the current moment in the initial predicted parameter trajectory is taken as the first sampling moment, and the moment following the moment closest to the current moment in the initial predicted parameter trajectory is taken as the moment following the first sampling moment. The target predicted parameter trajectory includes the local controller and the desired motion state corresponding to the first sampling moment and its following moments. At each selected sampling moment, two independent random samples are performed. For random sampling of a local controller, a number can be randomly selected from a pool of all available local controller numbers. Optionally, random sampling can be performed using Gaussian noise, and then rounding or subtracting values ​​based on the random sampled values ​​to determine the sampling number corresponding to the local controller. For random sampling of the desired motion state, random noise can be added to the desired motion state corresponding to the local controller (not limited to one dimension, but can be the desired motion state in multiple dimensions, such as position and velocity). Then, the sampling numbers obtained from all sampling moments and the sampled desired motion states are combined in chronological order to form a complete sampled predicted parameter trajectory.

[0053] In some embodiments, certain local controllers may physically work collaboratively. During sampling, these local controllers can be sampled together as a "controller group," meaning they are either all selected or all not selected in a sampled prediction parameter trajectory to ensure the physical plausibility of the generated trajectory. Furthermore, the sampling of local controller numbers does not need to be completely random; instead, the sampling number corresponding to the local controller can be determined based on a preset probability distribution. This allows for a higher probability of sampling certain core controllers, or the sampling probability of different controller combinations can be dynamically adjusted according to current task requirements.

[0054] Optionally, special numbers can be assigned to achieve specific effects. That is, the local controllers corresponding to these special numbers do not exist in the self-moving device. Therefore, when simulating the sampled predicted parameter trajectory, if the sampled predicted parameter trajectory contains predicted trajectory elements including special numbers (i.e., target numbers), the operation of adjusting the device state information based on the predicted trajectory elements can be skipped during simulation. This dynamically reduces the number of local controller switching in the sampled predicted parameter trajectory, thereby improving the quality of the final generated trajectory.

[0055] In this embodiment, by sampling the controller number and the corresponding desired motion state, the freedom and flexibility of motion planning can be increased. This expands the dimension of random sampling. Compared to sampling the control input of the mobile device, this embodiment can accelerate the efficiency of motion planning by sampling the local target state, and can discover a better and more reliable motion trajectory by exploring multiple possible trajectories.

[0056] It is understandable that after sampling the local controllers and their desired motion states of the self-moving device, it is necessary to determine the motion effect of the self-moving device under the action of each local controller on each sampled predicted parameter trajectory, i.e., the possible changes in motion state information. Only in this way can the optimal motion plan corresponding to each time period (i.e., under which local controller should a certain desired motion state be achieved) be determined from the dimension of the changes in the motion state of the self-moving device. Therefore, it is necessary to simulate each sampled predicted parameter trajectory to obtain the device state trajectory information corresponding to each sampled predicted parameter trajectory. For example, obtaining multiple device state trajectory information corresponding to the device motion state based on each sampled predicted parameter trajectory includes: for each sampled predicted parameter trajectory, obtaining the desired motion state corresponding to each sampling time; adjusting the device motion state based on the local controller and desired motion state corresponding to the first sampling time to obtain the first intermediate motion state; adjusting the first intermediate motion state based on the local controller and desired motion state corresponding to the second sampling time to obtain the second intermediate motion state; repeating the above steps until the last intermediate motion state corresponding to the last sampling time is obtained; obtaining the corresponding device state trajectory information based on the intermediate motion states corresponding to each sampling time.

[0057] The intermediate motion state is the temporary state reached by the self-moving device after executing the controller command at a sampling moment (i.e., running the local controller based on the corresponding desired motion state) during the simulation process.

[0058] Specifically, the simulation starts with the motion state of the self-moving device at the current time point. Next, the local controller and desired motion state corresponding to the first sampling moment in the sampled prediction parameter trajectory are extracted. This controller instruction is applied to the initial motion device state, and the state reached by the self-moving device after the first sampling moment is calculated using a kinematic or dynamic model—the first intermediate motion state. Then, using the first intermediate motion state as the new starting point, the controller instruction at the second sampling moment is applied to obtain the second intermediate motion state. This process is repeated until all sampling moments on the sampled prediction parameter trajectory are processed, ultimately resulting in a device state trajectory information composed of all intermediate motion states concatenated in chronological order.

[0059] For example, taking the parameter trajectory ((t0, k0, q0), (t1, k1, q1), ..., (tn, kn, qn)) as an example, assuming the motion state information of the self-moving device at the current time point is qs (i.e., the initial state), then within the time interval [t0, t1], the simulation shows the machine starting from the initial state qs and moving towards the target point q0 under the action of controller k0. Under the action of controller k0, the machine will reach an intermediate state qs1 at time t1. Then, based on this intermediate state qs1, within the time interval [t1, t2], the simulation shows the machine starting from qs1 and moving towards the target point q2 under the action of controller k1. Finally, assuming the total simulation time is T, the last segment will simulate the machine starting from qsn and moving towards the target state qn under the action of controller kn within the time interval [tn, t0+T].

[0060] In this embodiment, by transforming the abstract parameter trajectory (a series of instructions) into a concrete, visualized state trajectory (the actual path and attitude changes of the device in space), a solid foundation is provided for subsequent quantitative evaluation. Through this step-by-step iterative and precise simulation, the dynamic response of the device under each control command sequence can be accurately predicted. This is crucial for early detection of dangerous trajectories that may lead to instability, overturning, or collisions, thereby significantly improving the safety and reliability of the planning.

[0061] The reliability of the device state trajectory information obtained through the above steps varies. For example, controlling a self-moving device according to the sampled prediction parameter trajectory corresponding to a certain device state trajectory information may not enable the self-moving device to reach the target state, or it may cause the self-moving device to collide. The reliability of this type of sampled prediction parameter trajectory is low. Therefore, the weight of this type of sampled prediction parameter trajectory can be set to a lower value to minimize its impact on the target prediction parameter trajectory, thereby increasing the reliability of the final determined target prediction parameter trajectory. For example, the device state trajectory information includes intermediate motion states corresponding to each time moment. Cost information for each device state trajectory information is obtained based on the target state. Weight information for the corresponding sampled prediction parameter trajectory is obtained based on the cost information for each device state. This includes: for each device state trajectory information, obtaining a first cost based on the difference between the intermediate motion state and the target state; performing a security assessment on the device state trajectory information to obtain a second cost corresponding to the device state trajectory information; obtaining corresponding cost information based on the first and second costs; acquiring preset coefficients; and obtaining weight information corresponding to each device state trajectory information based on the ratio between the cost information corresponding to each device state trajectory information and the preset coefficients, thereby determining the weight information for the sampled prediction parameter trajectory corresponding to each device state trajectory information.

[0062] The first cost measures the effectiveness of the device's status trajectory information in achieving the mission objective. The first cost primarily focuses on the question of "good" or "bad." The second cost measures the safety of the trajectory. The second cost primarily focuses on the question of "safe" or "unsafe." The preset coefficient is an adjustable parameter used to control the concentration or dispersion of weight allocation.

[0063] For example, the cost information can be composed of a first cost and a second cost. The first cost can be obtained by calculating the weighted difference between the device state trajectory information and the target state in terms of position, attitude, and velocity. That is, the final intermediate motion state (hereinafter referred to as the final motion state) corresponding to the device state trajectory information is determined. The first cost is determined based on the difference between the final intermediate motion state and the target state. Specifically, if both the final motion state and the target state include corresponding position information, attitude information, and velocity information, then the first difference between the position information corresponding to the final motion state and the position information corresponding to the target state, the second difference between the attitude information corresponding to the final motion state and the attitude information corresponding to the target state, and the third difference between the velocity information corresponding to the final motion state and the velocity information corresponding to the target state are calculated respectively. Then, the position weight corresponding to the position, the attitude weight corresponding to the attitude, and the velocity weight corresponding to the velocity are obtained. The first, second, and third differences are then weighted and summed based on the position weight, attitude weight, and velocity weight respectively to obtain the corresponding weighted difference. The first cost is then obtained based on this weighted difference. In addition, the first cost may also include a time cost. A description of the time cost can be found below.

[0064] The second cost can be obtained by checking the minimum distance between each intermediate state information in the device state trajectory information and environmental obstacles. The smaller the distance, the higher the cost. For example, environmental information is acquired, and the distance between each intermediate state information and environmental obstacles is determined based on this information. The second cost is then determined based on this distance. Additionally, the second cost may also include the cost corresponding to the smoothness between the various intermediate state information in the device state trajectory information. In this way, motion planning can be considered from the perspective of the mobility safety of the self-moving device.

[0065] Then, the two are linearly weighted to obtain the final cost information. For example, the total cost is calculated as: cost = w1 * first cost + w2 * second cost, where w1 is the cost weight corresponding to the first cost and w2 is the cost weight corresponding to the second cost. When calculating the weight information, a preset coefficient T is obtained, and then the Boltzmann distribution formula weight = exp(-cost / T) is used to calculate the original weight corresponding to each device state trajectory information. Finally, all original weights are normalized to obtain the final weight information.

[0066] In some embodiments, the cost weights corresponding to the first cost and the second cost can be adjusted. This allows the motion style of the mobile device to be adjusted by changing the cost weights corresponding to various costs, such as prioritizing safety or adopting a more risky style.

[0067] In this embodiment, by calculating and fusing the first cost corresponding to the task objective and the second cost corresponding to the safety constraints separately, optimization problems in complex scenarios can be handled clearly and flexibly. Furthermore, the robot's behavior can be made more aggressive or conservative by adjusting the weights. Simultaneously, the introduction of preset coefficients makes the weight allocation process exploratory and convergent, resulting in a more intelligent and efficient motion planning process and reducing the possibility of prematurely getting trapped in local optima.

[0068] In practical applications, the target state includes the target position and the target attitude, and the first cost includes the time cost and the attitude cost. The first cost is obtained based on the difference between the intermediate motion state corresponding to the device state trajectory information and the target state, including: determining the final time corresponding to the intermediate motion state of the target in the device state trajectory information that has reached the target position; obtaining the target time based on the final time and the initial time of the device state trajectory information, and obtaining the time cost based on the target time; obtaining the final attitude corresponding to the intermediate motion state of the target at the final time, and obtaining the attitude cost based on the final attitude and the target attitude.

[0069] Among these, time cost is used to measure the efficiency of completing the task objective. The longer the time, the higher the cost. Attitude cost is used to measure the accuracy of the final attitude. The greater the difference between the final attitude and the target attitude, the higher the cost.

[0070] In some cases, controlling a self-moving device according to the trajectory of sampled predicted parameters may not result in reaching the target state at the last moment, or the difference between the target state and the target state may be within a preset range. That is, the target state may be reached at some intermediate moment in the device state trajectory information (e.g., arriving at the target location ahead of schedule). In other words, controlling the self-moving device according to the trajectory of sampled predicted parameters corresponding to this device state trajectory information can reach the target state (e.g., reach the target location) earlier or as quickly as possible. It is understood that the cost corresponding to this type of sampled predicted parameter trajectory should be relatively small, while the corresponding weight information should be relatively large. Therefore, the final moment corresponding to the intermediate motion state of reaching the target location in the device state trajectory information can be determined; based on the final moment and the initial moment of the device state trajectory information, the target time consumption is obtained; and based on the target time consumption, the time consumption cost is obtained.

[0071] Specifically, within a single device state trajectory, all intermediate motion states are traversed to find the intermediate motion state within the allowable range (i.e., the aforementioned preset range) where the corresponding device position first enters the target position in the target state. This intermediate motion state is recorded as the target intermediate motion state. The time corresponding to this target intermediate motion state is recorded as the final time. The time cost is the time difference between this final time and the trajectory start time. Simultaneously, based on the target intermediate motion state, the device attitude (i.e., the final attitude) corresponding to this final time is determined, and the Euler angle or quaternion difference between this final attitude and the target attitude is calculated to obtain the attitude cost.

[0072] Alternatively, for attitude cost, in addition to considering the difference between the final attitude and the target attitude, penalties can be imposed on parts of the attitude change that are too large based on the attitude smoothness throughout the process, and the corresponding cost can be increased.

[0073] In this embodiment, by refining the first cost into two dimensions, time and attitude, the quality of task completion can be evaluated more accurately based on the task objective, ensuring that the robot not only "gets there", but also "gets there well" and "gets there correctly".

[0074] For example, a security assessment is performed on the device state trajectory information to obtain a second cost corresponding to the device state trajectory information, including: acquiring environmental elevation map information; determining the intermediate attitude corresponding to each moment based on the intermediate motion state corresponding to the device state trajectory information; determining the security assessment information corresponding to the intermediate attitude based on the environmental elevation map information; and obtaining the second cost based on the security assessment information corresponding to each moment.

[0075] Environmental elevation map information is a data structure describing the height information of the environmental terrain, similar to a digital elevation model (DEM). It contains height data for various points on the ground. Environmental elevation map information includes a height map and a confidence map. The height map can be viewed as a two-dimensional image, where each pixel value corresponds to the height of an obstacle at that point. The confidence map is also a two-dimensional image, where each pixel value corresponds to the confidence level of the height information at that point. When sensor data is sparse, has blind spots, or requires multiple frames for height completion, confidence information helps planning algorithms determine the validity of point height information. For example, a confidence level of 1 indicates complete confidence, while a confidence level of 0 indicates complete uncertainty. Safety assessment information includes safety indicators derived from evaluating the device's attitude based on environmental elevation map information, such as the clearance between the chassis and the ground, the tilt angle of the device, and the minimum distance between the self-moving device and obstacles in the environment.

[0076] Next, to obtain the second cost, the environmental elevation map information of the self-moving device's environment is first loaded. Then, each intermediate motion state on the device's state trajectory information is traversed to obtain the intermediate attitude of the self-moving device at each moment. For each attitude, the 3D model of the self-moving device is projected onto the elevation map, and the minimum distance between each point of the chassis and the ground (ground clearance) is calculated, or the angle between the vehicle body normal vector and the ground normal vector (slope) is calculated to obtain multiple safety reference indicators (i.e., safety assessment information). These safety reference indicators are compared with preset safety thresholds; the greater the degree to which the threshold is exceeded, the higher the accumulated second cost.

[0077] In some other embodiments, the safety assessment information also includes the smoothness of the trajectory. Specifically, the safety assessment information is obtained by calculating the smoothness corresponding to the intermediate velocity in each intermediate motion state of the motion trajectory information. Alternatively, the safety assessment information can be obtained by calculating the smoothness corresponding to the intermediate posture in each intermediate motion state of the motion trajectory information.

[0078] In this embodiment, by incorporating environmental elevation map information for safety assessment, the method becomes applicable to unstructured environments, allowing for the early consideration of risks posed by complex terrain and the planning of truly safe and feasible paths. Furthermore, by incorporating the smoothness of the self-moving device's motion into the safety assessment, the movement of the self-moving device becomes smoother and safer.

[0079] In some embodiments, obtaining the target prediction parameter trajectory corresponding to the current time point based on each sampled prediction parameter trajectory and the corresponding weight information includes: for each time point, based on the weight information corresponding to each sampled prediction parameter trajectory, weighting the number and motion expectation state of the local controller corresponding to the corresponding time point in each sampled prediction parameter trajectory to obtain the target number and target motion expectation state of the local controller corresponding to each time point, so as to obtain the target prediction parameter trajectory corresponding to the current time point.

[0080] Specifically, first, all sampled predicted parameter trajectories are aligned on the time axis. Then, for each sampling time, the system performs a weighting operation. For continuous values ​​such as the desired motion state (e.g., position, velocity), a weighted average can be directly performed. For local controller numbers, the weighted frequency of each local controller number appearing in all sampled predicted parameter trajectories at the current sampling time can be counted (i.e., the weight of each trajectory is used as its number's "vote"), and then the number with the highest weighted frequency can be selected as the target number for the current sampling time. Alternatively, each local controller number can be directly weighted, and the number of the local controller closest to the weighted result can be determined as the target number corresponding to the current sampling time.

[0081] In this embodiment, by weighted fusion of all alternative schemes, the final trajectory absorbs the advantages of all high-weight trajectories while smoothing out any abrupt changes or defects that might exist in a single trajectory. This results in smoother final control commands, which is beneficial for the stable operation of the equipment. Compared to relying on any single optimal prediction, this significantly reduces the dependence on the accuracy of the initial prediction, making the entire planning system more reliable.

[0082] In some embodiments, to reduce the number of local controller switching operations, special numbers can be set so that these special numbers are handled specially during simulation. Multiple device state trajectory information corresponding to the device motion state is obtained based on each sampled prediction parameter trajectory, including: if a target sampling time exists in the sampled prediction parameter trajectory, and the number of the local controller corresponding to the target sampling time is a first target number, then the step of adjusting the device motion state by the local controller with the first target number is skipped; if a target sampling time exists in the sampled prediction parameter trajectory, and the number of the local controller corresponding to the target sampling time is a second target number, then the step of adjusting the device motion state by the local controllers corresponding to the second target number and each sampling time after the target sampling time is skipped.

[0083] The first target number is a special local controller number. When this number appears in the sampling trajectory, the logic to "skip the current step" is triggered. The second target number is another special local controller number. When this number appears in the sampling trajectory, the logic to "skip the current step and all subsequent steps" is triggered.

[0084] Specifically, during simulation, the local controllers and desired motion states at each time step are traversed, and the device motion state is updated based on the local controllers and desired motion states at the current time step. If the local controller number corresponding to the current target sampling time is detected to be the first target number, the instruction of this local controller is ignored, the current device state information remains unchanged, and then the process proceeds directly to the next sampling time step. If the local controller number corresponding to the next sampling time step is not the first target number or the second target number, the current device state information is updated based on that local controller.

[0085] If the controller number at the current time point is detected to be the second target number during the simulation, the simulation can not only skip the current step, but also immediately terminate the simulation of all subsequent time points of that trajectory.

[0086] In this embodiment, by introducing skip and termination logic, the system can reduce unnecessary calculations on invalid or meaningless trajectory parts, thereby saving a lot of computing resources.

[0087] In some embodiments, when simulating the trajectory of the sampled predicted parameters, it is also possible to analyze whether the current motion device state information meets the pre-use conditions of the local controller at the current sampling time. If the current motion device state information meets the pre-use conditions of the local controller at the current sampling time, the current motion state information can be updated based on the local controller and its expected motion state at the current sampling time, and then the relevant update operation can be performed at the next sampling time. If the current motion device state information does not meet the pre-use conditions of the local controller at the current sampling time, the current device state information is updated to the state corresponding to stopping in place. This ensures that the simulated trajectory is safe.

[0088] In one exemplary embodiment, the following steps may be performed to achieve motion planning for a self-moving device:

[0089] First, obtain the trajectory of the initial prediction parameters corresponding to the historical time points.

[0090] The initial predicted parameter trajectory includes the expected motion states of the local controller at each moment starting from the historical time point, which are used to control the motion of the self-moving device.

[0091] Next, based on each moment in the initial predicted parameter trajectory, each sampling moment is obtained.

[0092] For example, the initial predicted parameter trajectory is time-shifted. During the time shift, the target time closest to the current time point in the initial predicted parameter trajectory is determined. Based on the target time in the initial predicted parameter trajectory and the time backward of that target time, each sampling time in the sampled predicted parameter trajectory is obtained.

[0093] Multiple random samples are taken from the local controller number and the corresponding motion expectation state at each time point to obtain multiple sample numbers and multiple sampled motion expectation states corresponding to each sampling time point, so as to obtain multiple sampled prediction parameter trajectories corresponding to the prediction parameter trajectory.

[0094] Next, the obtained trajectories of each sampled prediction parameter are simulated: the device motion state of the self-moving device corresponding to the current time point is obtained. For each sampled prediction parameter trajectory, the expected motion state corresponding to each sampling time is obtained; the device motion state is adjusted based on the local controller and the expected motion state corresponding to the first sampling time to obtain the first intermediate motion state; the first intermediate motion state is adjusted based on the local controller and the expected motion state corresponding to the second sampling time to obtain the second intermediate motion state; the above steps are repeated until the last intermediate motion state corresponding to the last sampling time is obtained; the corresponding device state trajectory information is obtained based on the intermediate motion states corresponding to each sampling time.

[0095] During the simulation, if a target sampling time exists in the sampling prediction parameter trajectory, and the local controller corresponding to the target sampling time is numbered as the first target number, then the step of adjusting the device motion state by the local controller with the first target number is skipped. If a target sampling time exists in the sampling prediction parameter trajectory, and the local controller corresponding to the target sampling time is numbered as the second target number, then the step of adjusting the device motion state by the local controllers corresponding to the second target number and all subsequent sampling times is skipped. The first and second target numbers are preset.

[0096] Then, the cost information corresponding to the state trajectory information of each device is calculated, and the weight information of each device's state trajectory information is determined based on this cost information. The cost information can include various costs, such as attitude cost, time cost, and safety cost.

[0097] Regarding attitude cost and time cost: For each device state trajectory information, determine the final time corresponding to the intermediate motion state of the target in the device state trajectory information to reach the target position; based on the final time and the initial time of the device state trajectory information, obtain the target time consumption, and obtain the time cost based on the target time consumption; obtain the final attitude corresponding to the intermediate motion state of the target at the final time, and obtain the attitude cost based on the final attitude and the target attitude.

[0098] Regarding the safety cost: acquire environmental elevation map information; determine the intermediate attitude at each moment based on the intermediate motion state corresponding to the equipment status trajectory information; determine the safety assessment information corresponding to the intermediate attitude based on the environmental elevation map information; and obtain the second cost based on the safety assessment information at each moment.

[0099] Total cost: The cost information is obtained based on the first cost and the second cost.

[0100] Next, a preset coefficient is obtained. Based on the ratio between the cost information corresponding to the state trajectory information of each device and the preset coefficient, the weight information corresponding to the state trajectory information of each device is obtained, so as to determine the weight information of the sampling prediction parameter trajectory corresponding to the state trajectory information of each device.

[0101] Finally, for each time step, based on the weight information corresponding to each sampled prediction parameter trajectory, the number and motion expectation state of the local controller corresponding to the corresponding time step in each sampled prediction parameter trajectory are weighted to obtain the target number and target motion expectation state of the local controller at each time step, so as to obtain the target prediction parameter trajectory corresponding to the current time point, so that the self-moving device controls each local controller to perform the corresponding motion according to the target prediction parameter trajectory.

[0102] In this process, the desired motion state corresponding to each local controller in the various sampled predicted parameter trajectories can include multiple types of states, such as position, velocity, and direction. During sampling, each type of state is sampled. That is, each type of state undergoes weighted processing based on corresponding weight information to obtain the target desired motion state. After determining the target predicted parameter trajectory, the specific desired motion state corresponding to that local controller can be filtered from the target desired motion state based on the local controller's attributes, and the target desired motion state of that local controller can be updated based on this specific desired motion state. Alternatively, when controlling each local controller to perform corresponding motion according to the target predicted parameter trajectory, the desired motion state corresponding to the current local controller can be filtered from the target desired motion state to control the self-moving device.

[0103] Through the above steps, compared to methods that directly sample control quantities, sampling the target state of local controllers requires a smaller dimensionality of variables, resulting in a smaller dimensionality of variables to be optimized and easier convergence. Compared to methods that directly sample and optimize system control quantities, this method can accommodate more local controllers, allowing for direct combination and optimization at the robot behavior level, which is more efficient and easier to iterate.

[0104] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0105] Based on the same inventive concept, this application also provides a motion planning device for implementing the motion planning method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more motion planning device embodiments provided below can be found in the limitations of the motion planning method described above, and will not be repeated here.

[0106] In one exemplary embodiment, such as Figure 3 As shown, a motion planning device 300 is provided, including: an acquisition module 301, a sampling module 302, a simulation module 303, a cost module 304, and a determination module 305, wherein:

[0107] The acquisition module 301 is used to acquire the initial prediction parameter trajectory corresponding to the historical time point. The initial prediction parameter trajectory includes the expected motion state of the local controller at each time point starting from the historical time point, which is used to control the motion of the self-moving device.

[0108] The sampling module 302 is used to randomly sample the motion expectation state of the local controller at each time step in the initial prediction parameter trajectory multiple times to obtain multiple sampled prediction parameter trajectories.

[0109] The simulation module 303 is used to obtain the device motion state of the self-moving device corresponding to the current time point, and to obtain multiple device state trajectory information corresponding to the device motion state based on the trajectory of each sampled prediction parameter.

[0110] The cost module 304 is used to obtain the target state of the self-moving device at the current time point, obtain the cost information of the trajectory information of each device state based on the target state, and obtain the weight information of the corresponding sampling prediction parameter trajectory based on the cost information of each device state.

[0111] The determination module 305 is used to obtain the target prediction parameter trajectory corresponding to the current time point based on the trajectory of each sampled prediction parameter and the corresponding weight information, so that the self-moving device controls each local controller to perform corresponding movements according to the target prediction parameter trajectory.

[0112] In some embodiments, the initial predicted parameter trajectory includes the number of each local controller corresponding to each time point starting from a historical time point and the motion expectation state corresponding to the local controller. In order to obtain multiple sampled predicted parameter trajectories by randomly sampling the motion expectation state of the local controller at each time point in the initial predicted parameter trajectory multiple times, the sampling module 302 is specifically used to: obtain each sampling time based on each time point in the initial predicted parameter trajectory; and randomly sample the number of the local controller corresponding to each time point and the corresponding motion expectation state multiple times to obtain multiple sampling numbers and multiple sampled motion expectation states corresponding to each sampling time point, so as to obtain multiple sampled predicted parameter trajectories corresponding to the predicted parameter trajectory.

[0113] In some embodiments, in obtaining multiple device state trajectory information corresponding to the device motion state based on each sampled prediction parameter trajectory, the simulation module 303 is specifically used to: for each sampled prediction parameter trajectory, obtain the expected motion state corresponding to each sampling time; adjust the device motion state based on the local controller and the expected motion state corresponding to the first sampling time to obtain a first intermediate motion state; adjust the first intermediate motion state based on the local controller and the expected motion state corresponding to the second sampling time to obtain a second intermediate motion state; repeat the above steps until the last intermediate motion state corresponding to the last sampling time is obtained; obtain the corresponding device state trajectory information based on the intermediate motion states corresponding to each sampling time.

[0114] In some embodiments, the device state trajectory information includes intermediate motion states corresponding to each time moment. Regarding obtaining cost information for each device state trajectory based on the target state, and obtaining weight information for the corresponding sampled prediction parameter trajectory based on the cost information for each device state, the cost module 304 is specifically used for: obtaining a first cost for each device state trajectory based on the difference between the intermediate motion state and the target state; performing a security assessment on the device state trajectory to obtain a second cost corresponding to the device state trajectory; obtaining corresponding cost information based on the first and second costs; acquiring a preset coefficient; and obtaining weight information corresponding to each device state trajectory based on the ratio between the cost information corresponding to each device state trajectory and the preset coefficient, thereby determining the weight information for the sampled prediction parameter trajectory corresponding to each device state trajectory.

[0115] In some embodiments, the target state includes the target position and the target attitude, and the first cost includes the time cost and the attitude cost. In obtaining the first cost based on the difference between the intermediate motion state corresponding to the device state trajectory information and the target state, the cost module 304 is specifically used to: determine the final time corresponding to the target intermediate motion state that has reached the target position in the device state trajectory information; obtain the target time based on the final time and the initial time of the device state trajectory information, and obtain the time cost based on the target time; obtain the final attitude corresponding to the target intermediate motion state corresponding to the final time, and obtain the attitude cost based on the final attitude and the target attitude.

[0116] In some embodiments, in terms of performing a security assessment on the device state trajectory information to obtain the second cost corresponding to the device state trajectory information, the cost module 304 is specifically used to: obtain environmental elevation map information; determine the intermediate posture corresponding to each moment based on the intermediate motion state corresponding to the device state trajectory information; determine the security assessment information corresponding to the intermediate posture based on the environmental elevation map information; and obtain the second cost based on the security assessment information corresponding to each moment.

[0117] In some embodiments, in obtaining the target prediction parameter trajectory corresponding to the current time point based on each sampled prediction parameter trajectory and the corresponding weight information, the determining module 305 is specifically used to: for each time point, based on the weight information corresponding to each sampled prediction parameter trajectory, perform weighted processing on the number and motion expectation state of the local controller corresponding to the corresponding time point in each sampled prediction parameter trajectory to obtain the target number and target motion expectation state of the local controller corresponding to each time point, so as to obtain the target prediction parameter trajectory corresponding to the current time point.

[0118] In some embodiments, in obtaining multiple device state trajectory information corresponding to the device motion state based on each sampling prediction parameter trajectory, the determining module 305 is specifically configured to: if there is a target sampling time in the sampling prediction parameter trajectory, and the number of the local controller corresponding to the target sampling time is a first target number, then skip the step of adjusting the device motion state by the local controller of the first target number; if there is a target sampling time in the sampling prediction parameter trajectory, and the number of the local controller corresponding to the target sampling time is a second target number, then skip the step of adjusting the device motion state by the local controllers corresponding to the second target number and each sampling time after the target sampling time.

[0119] Each module in the aforementioned motion planning device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0120] In one exemplary embodiment, a computer device is provided, which may be a self-moving device, such as a robot, and its internal structure diagram may be as follows: Figure 4As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational 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 input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a motion planning method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0121] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0122] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0123] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0124] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0125] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0126] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0127] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 application.

[0128] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A motion planning method, characterized by, The method comprises: obtaining an initial prediction parameter trajectory corresponding to a historical time point, the initial prediction parameter trajectory comprising motion expectation states of local controllers at respective time points for controlling motion of a self-moving device starting from the historical time point; randomly sampling the motion expectation states of the local controllers at the respective time points in the initial prediction parameter trajectory to obtain a plurality of sampled prediction parameter trajectories; obtaining a device motion state of the self-moving device corresponding to a current time point, and obtaining a plurality of device state trajectory information corresponding to the device motion state based on the plurality of sampled prediction parameter trajectories; obtaining a target state of the self-moving device at the current time point, obtaining cost information of each device state trajectory information based on the target state, and obtaining weight information of the corresponding sampled prediction parameter trajectory based on the cost information of each device state; obtaining a target prediction parameter trajectory corresponding to the current time point based on the plurality of sampled prediction parameter trajectories and the corresponding weight information, so that the self-moving device controls the local controllers according to the target prediction parameter trajectory to perform corresponding motion.

2. The method of claim 1, wherein, The initial prediction parameter trajectory comprises numbers of the local controllers and motion expectation states corresponding to the local controllers at the respective time points starting from the historical time point, and the randomly sampling the motion expectation states of the local controllers at the respective time points in the initial prediction parameter trajectory to obtain a plurality of sampled prediction parameter trajectories comprises: obtaining a plurality of sampling time points based on the respective time points in the initial prediction parameter trajectory; randomly sampling the numbers of the local controllers and the corresponding motion expectation states at the respective time points to obtain a plurality of sampling numbers and a plurality of sampling motion expectation states corresponding to the plurality of sampling time points, so as to obtain a plurality of sampled prediction parameter trajectories corresponding to the prediction parameter trajectory.

3. The method of claim 2, wherein, The obtaining a plurality of device state trajectory information corresponding to the device motion state based on the plurality of sampled prediction parameter trajectories comprises: for each sampled prediction parameter trajectory, obtaining motion expectation states corresponding to the plurality of sampling time points, adjusting the device motion state based on the local controller and the motion expectation state corresponding to a first sampling time point to obtain a first intermediate motion state, adjusting the first intermediate motion state based on the local controller and the motion expectation state corresponding to a second sampling time point to obtain a second intermediate motion state, and repeating the above steps until a last intermediate motion state corresponding to a last sampling time point is obtained, and obtaining corresponding device state trajectory information based on the intermediate motion states corresponding to the plurality of sampling time points.

4. The method of claim 1, wherein, The device state trajectory information comprises intermediate motion states corresponding to the respective time points, the obtaining cost information of each device state trajectory information based on the target state, and the obtaining weight information of the corresponding sampled prediction parameter trajectory based on the cost information of each device state comprise: For each of the device state trajectory information, a first cost is obtained based on a gap between an intermediate motion state corresponding to the device state trajectory information and the target state, a safety evaluation is performed on the device state trajectory information to obtain a second cost corresponding to the device state trajectory information, and the cost information corresponding to the device state trajectory information is obtained based on the first cost and the second cost; A preset coefficient is obtained, and weight information corresponding to each of the device state trajectory information is obtained based on a ratio between the cost information corresponding to each of the device state trajectory information and the preset coefficient, so as to determine weight information of a sampling prediction parameter trajectory corresponding to each of the device state trajectory information.

5. The method of claim 4, wherein, The target state includes a target position and a target attitude, and the first cost includes a time consumption cost and an attitude cost; The first cost is obtained based on a gap between an intermediate motion state corresponding to the device state trajectory information and the target state, including: A final time corresponding to a target intermediate motion state reaching the target position in the device state trajectory information is determined, a target time consumption is obtained based on the final time and an initial time of the device state trajectory information, and the time consumption cost is obtained based on the target time consumption; A final attitude corresponding to the target intermediate motion state corresponding to the final time is obtained, and the attitude cost is obtained based on the final attitude and the target attitude; The safety evaluation is performed on the device state trajectory information to obtain the second cost corresponding to the device state trajectory information, including: Environment elevation map information is obtained; An intermediate attitude corresponding to each time is determined based on the intermediate motion state corresponding to the device state trajectory information; Safety evaluation information corresponding to the intermediate attitude is determined based on the environment elevation map information, and the second cost is obtained based on the safety evaluation information corresponding to each time.

6. The method of claim 2, wherein, The target prediction parameter trajectory corresponding to the current time point is obtained based on each of the sampling prediction parameter trajectories and the weight information corresponding to each of the sampling prediction parameter trajectories, including: For each time, the number and the motion expectation state of the local controller corresponding to each time in each of the sampling prediction parameter trajectories are weighted based on the weight information corresponding to each of the sampling prediction parameter trajectories, to obtain the number and the motion expectation state of the local controller corresponding to each time, so as to obtain the target prediction parameter trajectory corresponding to the current time point.

7. The method of claim 3, wherein, The plurality of device state trajectory information corresponding to the device motion state is obtained based on each of the sampling prediction parameter trajectories, including: If there is a target sampling time in the sampling prediction parameter trajectory, the number of the local controller corresponding to the target sampling time is a first target number, the step of adjusting the device motion state by the local controller with the first target number is skipped; If there is a target sampling time in the sampling prediction parameter trajectory, the number of the local controller corresponding to the target sampling time is a second target number, the steps of adjusting the device motion state by the local controller corresponding to each of the sampling times after the target sampling time are skipped.

8. A motion planning device, characterized by The device includes: An acquisition module is configured to acquire an initial prediction parameter trajectory corresponding to a historical time point, the initial prediction parameter trajectory including motion expectation states of local controllers for controlling the self-moving device at each time point starting from the historical time point; A sampling module is configured to randomly sample the motion expectation states of the local controllers at each time point in the initial prediction parameter trajectory multiple times to obtain multiple sampled prediction parameter trajectories; An emulation module is configured to acquire a device motion state of the self-moving device corresponding to a current time point, and obtain multiple device state trajectory information corresponding to the device motion state based on the multiple sampled prediction parameter trajectories; A cost module is configured to acquire a target state of the self-moving device at the current time point, obtain cost information of each device state trajectory information based on the target state, and obtain weight information of the corresponding sampled prediction parameter trajectory based on the cost information of each device state; A determination module is configured to obtain a target prediction parameter trajectory corresponding to the current time point based on the multiple sampled prediction parameter trajectories and the corresponding weight information, so that the self-moving device controls each local controller according to the target prediction parameter trajectory to perform corresponding motion. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method in any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7.