Motion path planning method and device for desktop wheeled robot

By using behavior tree architecture and dynamic selection of motion planning algorithms, the problems of tight coupling between task decision-making and motion planning control and single, fixed strategies in motion path planning of desktop wheeled robots are solved, realizing the intelligence and flexibility of robot behavior and adapting to complex task environments.

CN121386764APending Publication Date: 2026-01-23SHENZHEN TIANJING YUHONG TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511563757.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-29
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

In the existing technology, the motion path planning method for desktop wheeled robots has the problems of tight coupling between task decision logic and motion planning control, as well as single and rigid planning strategies. This causes the robot to behave rigidly in complex and ever-changing task environments and cannot adapt to different task semantics and environmental contexts.

Method used

The behavior tree architecture is used to organize the task logic. The behavior tree engine periodically executes the behavior tree to generate a task context corresponding to the current task stage. Based on the task context, multiple motion planning algorithms are dynamically selected to generate motion path instructions and control the robot to execute them.

Benefits of technology

It achieves clear and hierarchical task logic, high modularity, strong system scalability, intelligent and flexible robot behavior, and can respond to environmental changes and abnormal situations in a timely manner to perform fine movements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121386764A_ABST
    Figure CN121386764A_ABST
Patent Text Reader

Abstract

The invention provides a motion path planning method for a desktop wheeled robot, which comprises the following steps: when a target task is received, loading a behavior tree corresponding to the target task, the behavior tree comprising a tree logic structure composed of a control flow node, a condition node and an action node; periodically executing the behavior tree through a behavior tree engine so as to determine an execution flow according to a logic structure of the behavior tree; when the execution process triggers a specific path planning action node, a task context corresponding to a current task stage is generated, and the task context is multi-dimensional structured data containing target description and planning constraints; dynamically selecting at least one target motion planning algorithm from a plurality of preset motion planning algorithms based on the task context; and generating a current motion path instruction by using the target motion planning algorithm, and controlling the desktop wheeled robot to execute. The method has the technical effect that the planning strategy can be dynamically adjusted according to the task context.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of desktop wheeled robots, and more specifically to a method and apparatus for planning the motion path of a desktop wheeled robot. Background Technology

[0002] Desktop wheeled robots have become a research hotspot in the field of robotics due to their wide range of applications in areas such as item sorting, laboratory automation, education, entertainment, and companionship services. These applications require robots to reliably and flexibly complete various movement tasks within a limited and constantly changing desktop area. Currently, motion path planning schemes for this type of robot mainly rely on the following two mainstream technical approaches: One approach is the finite state machine-based planning method. The core principle of this method is to predefine a finite number of discrete states the robot can be in, such as "idle," "moving," "obstacle avoidance," and "task completed," and explicitly specify the conditions for transitions between states. For example, when the robot receives a target task, the state transitions from "idle" to "moving," and a pre-defined path planning algorithm is invoked to calculate the global path; when the sensor detects an obstacle, the state transitions to "obstacle avoidance," and a reactive obstacle avoidance algorithm is activated. However, this approach has a significant drawback: finite states and explicit transition rules are inherently cumbersome and inflexible when faced with a large number of unstructured tasks requiring nested processing.

[0003] Another approach is based on a single or fixed sequential planner. This method relies on a fixed planning algorithm or a series of algorithms in a fixed order, regardless of the task scenario. It is primarily used to solve point-to-point movement problems from a starting point to an end point. However, this approach also has inherent limitations. It cannot intelligently adjust its planning strategy based on different task semantics and environmental contexts. A single, fixed planning strategy struggles to balance and switch between multiple conflicting objectives, leading to rigid robot behavior and an inability to adapt to complex, ever-changing, and sophisticated task requirements.

[0004] In summary, the core shortcomings of existing technologies lie in the tight coupling between task decision-making logic and motion planning control, as well as the singular and fixed planning strategy. Therefore, there is an urgent need for a motion path planning method for desktop wheeled robots that can decouple task logic from motion planning and dynamically adjust the planning strategy based on the task context. Summary of the Invention

[0005] In view of the aforementioned problems, this application is proposed to provide a motion path planning method and apparatus for a desktop wheeled robot that overcomes or at least partially solves the aforementioned problems, comprising: A motion path planning method for a desktop wheeled robot, characterized by comprising the following steps: When a target task is received, the behavior tree corresponding to the target task is loaded. The behavior tree contains a tree-shaped logical structure consisting of control flow nodes, condition nodes, and action nodes. The behavior tree engine periodically executes the behavior tree to determine the execution flow based on the logical structure of the behavior tree. When the execution process triggers a specific path planning action node, a task context corresponding to the current task stage is generated. The task context is multi-dimensional structured data containing target descriptions and planning constraints. Based on the task context, at least one target motion planning algorithm is dynamically selected from a plurality of preset motion planning algorithms; The target motion planning algorithm is used to generate the current motion path instruction and control the desktop wheeled robot to execute it.

[0006] Furthermore, the condition nodes in the behavior tree are configured to monitor robot status or environmental information in real time; The method further includes the following steps: When the condition node detects that a preset interruption condition has been triggered, the behavior tree engine pauses the currently executing action node and jumps to execute the interruption handling subtree corresponding to the interruption condition; the path planning action nodes contained in the interruption handling subtree use a different task context and / or target motion planning algorithm than the main task.

[0007] Furthermore, when the condition node detects that a preset interruption condition has been triggered, the behavior tree engine suspends the currently executing action node and jumps to execute the interruption handling subtree corresponding to the interruption condition. This specifically includes the following steps: The interruption conditions are continuously or periodically monitored through a monitoring condition node that executes in parallel with the main task subtree. The interruption conditions include, but are not limited to, detecting an emergency obstacle, the robot's battery level being lower than a preset threshold, or receiving a higher priority task instruction. When the monitoring condition node detects that the interruption condition has been triggered and returns a success status, the behavior tree engine immediately suspends the path planning action node or other action node that is currently being executed in the main task subtree and records its current execution status. The behavior tree engine will jump the execution flow to a predefined interrupt handling subtree bound to the specific interrupt condition, and begin executing the nodes in that subtree; After the interrupt handling subtree is completed, the behavior tree engine automatically restores the previously suspended main task subtree node and continues execution, or clears the main task state and jumps to a new task node, depending on the interrupt type and design.

[0008] Furthermore, the step of periodically executing the behavior tree through the behavior tree engine to determine the execution flow based on the logical structure of the behavior tree specifically includes the following steps: At the beginning of each execution cycle, the behavior tree engine initiates a traversal from the root node of the behavior tree and passes a token signal representing execution authority as the initial input to the root node; Each parent node in the behavior tree arbitrates the execution order of its child nodes according to its predefined logical rules and passes the token signal to the selected child node; this step is performed recursively until the token signal is passed to a leaf node. The activated leaf nodes execute their encapsulated logic, wherein condition nodes perform status queries and immediately return a success or failure status, and action nodes perform specific tasks and return a running, success, or failure status. The execution status of a child node is output and passed back to its parent node from bottom to top. The parent node determines the current state of the parent node based on its logical rules and the state returned by the child node. Finally, the root node outputs the overall execution status of the behavior tree for this cycle, thereby determining the execution flow of the current cycle.

[0009] Furthermore, the step of generating a task context corresponding to the current task stage when the execution process triggers a specific path planning action node specifically includes the following steps: When the path planning action node is triggered, its unique node identifier in the behavior tree is used as input to retrieve the corresponding basic task context template from the pre-configured context template library. The robot's global state information and current environmental perception data are acquired in real time. The basic task context template is fused with the real-time state information, and a task context object containing specific parameter values ​​is dynamically parsed and instantiated. The target description is specified as a coordinate that can be calculated, an object identifier, or a semantic region label. The instantiated task context object, which contains specific planning constraints and target information, is passed to the subsequent dynamic planner selection logic.

[0010] Furthermore, the task context also includes at least one of the following: planning strategy preference, dynamic constraints, task priority, and execution timeout threshold. The step of dynamically selecting at least one target motion planning algorithm from a plurality of preset motion planning algorithms based on the task context specifically includes the following steps: Analyze the planning strategy preferences and dynamic constraints in the task context; When the planning strategy preference indicates a globally optimal path, the global path planning algorithm is selected as the target motion planning algorithm. When the planning strategy preference indicates local real-time obstacle avoidance, the reactive local planning algorithm is selected as the target motion planning algorithm. When the dynamic constraints include requirements for motion smoothness, an optimization-based path planning algorithm is selected as the target motion planning algorithm.

[0011] Furthermore, the step of generating the current motion path instruction using the target motion planning algorithm and controlling the desktop wheeled robot to execute it specifically includes the following steps: The target description and dynamic constraints in the task context are used as input to drive the target motion planning algorithm to perform calculations and output a set of original path data representing the path point sequence and motion state. The raw path data is compiled into a sequence of motion primitives through the robot kinematics model and the underlying controller protocol. The sequence of motion primitives constitutes the motion path instruction for the current cycle. The motion primitive sequence is injected into the robot's closed-loop control queue, and the execution status monitoring process bound to the path planning action node is started simultaneously to track the instruction execution progress and the robot's actual pose in real time. The desktop wheeled robot executes the instructions in the closed-loop control queue and feeds back the execution status results to the path planning action node in real time. The node then returns the running, successful, or failed status to the behavior tree engine.

[0012] A motion path planning device for a desktop wheeled robot, characterized in that it comprises: The task behavior tree loading module is used to load the behavior tree corresponding to the target task when a target task is received. The behavior tree contains a tree-shaped logical structure composed of control flow nodes, condition nodes and action nodes. The behavior tree engine execution module is used to periodically execute the behavior tree through the behavior tree engine to determine the execution flow based on the logical structure of the behavior tree; The task context generation module is used to generate a task context corresponding to the current task stage when the execution process triggers a specific path planning action node. The task context is multi-dimensional structured data containing target description and planning constraints. The dynamic planner arbitration module is used to dynamically select at least one target motion planning algorithm from a plurality of preset motion planning algorithms based on the task context. The motion instruction compilation and execution module is used to generate the current motion path instruction using the target motion planning algorithm and control the desktop wheeled robot to execute it.

[0013] A computer electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When executed by the processor, the computer program implements the steps of a motion path planning method for a desktop wheeled robot as described above.

[0014] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a motion path planning method for a desktop wheeled robot as described above.

[0015] This application has the following advantages: In the embodiments of this application, addressing the core defects of tight coupling between task decision logic and motion planning control in existing technologies, as well as the single and fixed planning strategy, this application provides a motion path planning method for a desktop wheeled robot. Specifically, it involves: "When a target task is received, loading a behavior tree corresponding to the target task, wherein the behavior tree contains a tree-shaped logical structure composed of control flow nodes, condition nodes, and action nodes; periodically executing the behavior tree through a behavior tree engine to determine the execution flow based on the logical structure of the behavior tree; when the execution flow triggers a specific path planning action node, generating a task context corresponding to the current task stage, wherein the task context is multi-dimensional structured data containing target descriptions and planning constraints; dynamically selecting at least one target motion planning algorithm from a plurality of preset motion planning algorithms based on the task context; using the target motion planning algorithm to generate the current motion path instruction and controlling the desktop wheeled robot to execute it." By introducing a behavior tree architecture to organize task logic, the shortcomings of traditional finite state machines in complex tasks, such as state explosion, high logical coupling, and poor maintainability, are resolved. This achieves clear, layered task logic, high modularity, and strong system scalability. By encapsulating path planning as configurable action nodes in the behavior tree and generating a task context containing multi-dimensional information, the tight coupling between task decision-making and motion planning control is addressed, achieving decoupling between the task layer and the planning layer, allowing for independent development and evolution. Furthermore, by dynamically selecting a target planning algorithm from multiple pre-defined motion planning algorithms based on the task context, the problem of a single, rigid planning strategy that cannot adapt to different task stages and... By addressing the limitations of environmental conditions, the system achieves dynamic adaptation of planning strategies, resulting in more intelligent and flexible robot behavior. Through a behavior tree engine, the system periodically executes behavior trees and determines the execution flow based on node return states, overcoming the shortcomings of traditional methods in gracefully handling complex control logic such as task interruptions and retries. This gives the system a natural reactive capability, enabling timely responses to environmental changes and anomalies. Furthermore, by utilizing multi-dimensional structured data such as planning strategy preferences and dynamic constraints within the task context, the system overcomes the lack of semantic information in traditional path planning, which hinders the execution of refined motion. This allows for the transfer of high-level task semantics to low-level motion planning, achieving more precise and safer motion control. Attached Figure Description

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

[0017] Figure 1This is a flowchart illustrating the steps of a motion path planning method for a desktop wheeled robot according to an embodiment of this application; Figure 2 This is a structural block diagram of a motion path planning device for a desktop wheeled robot provided in one embodiment of this application; Figure 3 This is a schematic diagram of the structure of a computer electronic device provided in an embodiment of the present invention; 1. Computer electronic device; 2. External device; 3. Processing unit; 4. Bus; 5. Network adapter; 6. I / O interface; 7. Display; 8. Memory; 9. Random access memory; 10. Cache memory; 11. Storage system; 12. Program / utility; 13. Program module. Detailed Implementation

[0018] To make the objectives, features, and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0019] The inventors, through analysis of existing technologies, discovered the following: 1. Finite state machine-based planning methods are primarily used to implement task logic control with a clear sequence of steps. As task complexity increases, the number of states increases dramatically, leading to an abnormally bloated state machine structure and intricate transition relationships between states. This "state explosion" problem makes program code difficult to write, read, debug, and maintain. Any minor modification to the task logic can trigger a domino effect, resulting in extremely poor system scalability. This shortcoming directly stems from its core principle—finite states and explicit transition rules are inherently clumsy and inflexible when faced with a large number of unstructured tasks requiring nested processing. 2. Methods based on single or fixed serial planners are mainly used to solve point-to-point movement problems from start to finish. They cannot intelligently adjust planning strategies based on different task semantics and environmental contexts. For example, in the center of an open table, a robot may want to quickly pass through using the shortest path; while near the edge of the table or fragile items, safety margins and smooth movement need to be considered. A single, fixed planning strategy cannot balance and switch between these conflicting goals, resulting in rigid robot behavior that cannot adapt to the complex, ever-changing, and sophisticated task requirements.

[0020] Reference Figure 1 This application illustrates a motion path planning method for a desktop wheeled robot according to an embodiment of the present application, including the following steps: S110. When a target task is received, load the behavior tree corresponding to the target task. The behavior tree contains a tree-shaped logical structure composed of control flow nodes, condition nodes and action nodes. S120. The behavior tree is periodically executed through the behavior tree engine to determine the execution flow based on the logical structure of the behavior tree; S130. When the execution process triggers a specific path planning action node, a task context corresponding to the current task stage is generated. The task context is multi-dimensional structured data containing target description and planning constraints. S140. Based on the task context, dynamically select at least one target motion planning algorithm from a plurality of preset motion planning algorithms; S150. Using the target motion planning algorithm, generate the current motion path instruction and control the desktop wheeled robot to execute it.

[0021] In the embodiments of this application, addressing the core defects of tight coupling between task decision logic and motion planning control in existing technologies, as well as the single and fixed planning strategy, this application provides a motion path planning method for a desktop wheeled robot. Specifically, it involves: "When a target task is received, loading a behavior tree corresponding to the target task, wherein the behavior tree contains a tree-shaped logical structure composed of control flow nodes, condition nodes, and action nodes; periodically executing the behavior tree through a behavior tree engine to determine the execution flow based on the logical structure of the behavior tree; when the execution flow triggers a specific path planning action node, generating a task context corresponding to the current task stage, wherein the task context is multi-dimensional structured data containing target descriptions and planning constraints; dynamically selecting at least one target motion planning algorithm from a plurality of preset motion planning algorithms based on the task context; using the target motion planning algorithm to generate the current motion path instruction and controlling the desktop wheeled robot to execute it." By introducing a behavior tree architecture to organize task logic, the shortcomings of traditional finite state machines in complex tasks, such as state explosion, high logical coupling, and poor maintainability, are resolved. This achieves clear, layered task logic, high modularity, and strong system scalability. By encapsulating path planning as configurable action nodes in the behavior tree and generating a task context containing multi-dimensional information, the tight coupling between task decision-making and motion planning control is addressed, achieving decoupling between the task layer and the planning layer, allowing for independent development and evolution. Furthermore, by dynamically selecting a target planning algorithm from multiple pre-defined motion planning algorithms based on the task context, the problem of a single, rigid planning strategy that cannot adapt to different task stages and... By addressing the limitations of environmental conditions, the system achieves dynamic adaptation of planning strategies, resulting in more intelligent and flexible robot behavior. Through a behavior tree engine, the system periodically executes behavior trees and determines the execution flow based on node return states, overcoming the shortcomings of traditional methods in gracefully handling complex control logic such as task interruptions and retries. This gives the system a natural reactive capability, enabling timely responses to environmental changes and anomalies. Furthermore, by utilizing multi-dimensional structured data such as planning strategy preferences and dynamic constraints within the task context, the system overcomes the lack of semantic information in traditional path planning, which hinders the execution of refined motion. This allows for the transfer of high-level task semantics to low-level motion planning, achieving more precise and safer motion control.

[0022] The following will further explain a motion path planning method for a desktop wheeled robot in this exemplary embodiment.

[0023] In one embodiment of the present invention, the condition nodes in the behavior tree are configured to monitor robot status or environmental information in real time; the method further includes the step of: When the condition node detects that a preset interruption condition has been triggered, the behavior tree engine pauses the currently executing action node and jumps to execute the interruption handling subtree corresponding to the interruption condition; the path planning action nodes contained in the interruption handling subtree use a different task context and / or target motion planning algorithm than the main task.

[0024] It's important to note that when the behavior tree engine suspends the currently executing action node, it means the main task's action node (e.g., "move to point A") is temporarily suspended, but its internal state (e.g., planned path, current progress) is fully preserved. This is fundamentally different from "termination" or "reset," providing the possibility for task resumption. "Jump" describes the behavior tree engine's instantaneous switching capability in the execution flow. Its core lies in the binding relationship between interruption conditions and specific interruption handling subtrees, as well as the priority arbitration mechanism, ensuring the accuracy and timeliness of responses to emergency events. Different task contexts and / or target motion planning algorithms mean that interruption handling is not merely executing a simple "stop" action, but rather initiating a completely new planning strategy adapted to the current emergency situation based on the nature of the interruption, thereby achieving intelligent behavior switching.

[0025] As an example, the interruption conditions and their corresponding handling methods can be implemented in various forms, such as: safety-related interruptions: such as when an emergency obstacle suddenly cuts in through LiDAR or a vision sensor, or when the robot is about to fall off the table through the inertial measurement unit, the goal of the interruption handling subtree is "ensuring safety". Its path planning action node will use a task context containing [highest priority] and [strategy: emergency obstacle avoidance or stationary stop], and dynamically select a reactive local planning algorithm (such as DWA) or directly output a zero-speed command; system status-related interruptions: such as when the power management unit detects that the robot's battery level is lower than a preset threshold, the goal of the interruption handling subtree is "autonomous charging". Its path planning action node will use a task context containing [target: charging dock location] and [strategy: efficiency priority], and may select a global path planning algorithm to find the shortest path to the charging dock; external command-related interruptions: such as when a higher-priority task command (such as "return to the starting point immediately") is received through the wireless communication module, the interruption handling subtree will execute the new command, its path planning action node will use the task context defined by the new command, and may combine global and local planners depending on the complexity of the environment.

[0026] In one specific implementation, taking the "emergency obstacle avoidance" interruption as an example, a monitoring condition node, executing in parallel with the main task subtree, continuously compares sensor data with safety thresholds. When an obstacle is detected entering the 20cm warning zone ahead, this node returns a "success" status, indicating that the interruption condition has been triggered. Upon receiving the interruption signal, the behavior tree engine immediately suspends the "plan and execute path" action node in the currently executing "main task delivery" subtree and saves the robot's current coordinates, speed, and unfinished path segments as context states. The engine then jumps to the preset "emergency obstacle avoidance" interruption handling subtree. The path planning action node in this subtree is activated, and the task context it receives is defined as [Objective: No fixed objective, Strategy: Maximize safe distance, Constraint: Immediately effective], and dynamically selects a reactive local planning algorithm accordingly. This local planning algorithm, based on real-time sensor data, calculates the speed command to move the robot away from the obstacle, controlling the robot to move laterally or backward, instead of continuing the original forward trajectory. Once another condition node in the "Emergency Obstacle Avoidance" subtree (such as "Obstacle Cleared") is met, the subtree completes execution. The behavior tree engine automatically resumes the previously suspended "Main Task Delivery" subtree node. Based on the saved context, this node may replan a new path around the obstacle and continue execution, ultimately completing the item delivery task.

[0027] In one embodiment of the present invention, the specific process of "when the condition node detects that a preset interruption condition is triggered, the behavior tree engine suspends the currently executing action node and jumps to execute the interruption processing subtree corresponding to the interruption condition" can be further described in conjunction with the following description.

[0028] As described in the following steps The interruption conditions are continuously or periodically monitored through a monitoring condition node that executes in parallel with the main task subtree. The interruption conditions include, but are not limited to, detecting an emergency obstacle, the robot's battery level being lower than a preset threshold, or receiving a higher priority task instruction. When the monitoring condition node detects that the interruption condition has been triggered and returns a success status, the behavior tree engine immediately suspends the path planning action node or other action node that is currently being executed in the main task subtree and records its current execution status. The behavior tree engine will jump the execution flow to a predefined interrupt handling subtree bound to the specific interrupt condition, and begin executing the nodes in that subtree; After the interrupt handling subtree is completed, the behavior tree engine automatically restores the previously suspended main task subtree node and continues execution, or clears the main task state and jumps to a new task node, depending on the interrupt type and design.

[0029] It's important to note that parallel execution with the main task subtree means that interrupt monitoring has independent execution permissions equal to the main task, rather than being a sub-step of the main task. This ensures that monitoring takes effect immediately regardless of the complexity of the main task's execution. Suspension means freezing the task thread at a certain moment, storing its internal variables, progress, and other complete states in a context object, providing a data foundation for seamless task recovery. "Interrupt handling subtree bound to the specific interrupt condition" indicates that each interrupt condition has its own dedicated and validated processing flow; this explicit binding relationship guarantees the accuracy and reliability of the response behavior. Automatically deciding whether to resume or clean up "based on interrupt type and design" demonstrates the system's intelligent decision-making capability. Not all interrupts are suitable for resuming the original task; the system can perform post-event processing based on the level of disruption of the interrupt, showcasing the rationality of the behavior.

[0030] As an example, the implementation of the interrupt handling mechanism is highly flexible. For instance, in the monitoring mechanism, the parallel monitoring condition node can be implemented through an independent ROS topic subscriber, a dedicated query node running under a top-level parallel node in the behavior tree, or a service that directly polls the robot's underlying data interface. In terms of status recording, the "record current execution status" can be achieved by serializing the internal variables of the action node (such as target point, planned path, and execution time) and storing them in a stack. In terms of recovery strategy, the "based on interruption type" decision can be achieved by setting an output port representing the recovery strategy (such as "recoverable" or "needs termination") at the last node of the interrupt handling subtree, or by re-evaluating the system status before recovery through a dedicated "interruption decision" condition node.

[0031] In one specific implementation, taking an interruption of "receiving a higher-priority task instruction" as an example, a monitoring condition node named MonitorHighPriorityCommand is located in parallel with the main task subtree under the root node of the behavior tree. This node queries the task scheduling server periodically (e.g., every 100ms) through a ROS service client. When the server issues an "emergency supplies transport" instruction, the node receives the instruction, verifies that its priority is higher than the current task, and then returns a "success" status to the behavior tree engine. After receiving the success signal, the behavior tree engine immediately sends a halt() command to the PatrolArea action node in the currently executing "routine cleaning" main task subtree. This node is suspended, and the engine simultaneously records its context (including the currently cleaned area number and the planned patrol path point sequence) into a memory structure named PendingMainTaskContext. The engine then jumps the execution flow to the "Emergency Transportation" interruption handling subtree according to the preset binding relationship. This subtree begins execution: first, it loads the target point of the new task into the system through an UpdateMissionTarget action node, then triggers the PlanAndExecuteToNewTarget path planning action node. This node uses a completely new task context {target: emergency supply point, strategy: shortest time, priority: high} and dynamically selects the global A* algorithm for replanning. The robot then moves towards the new target. After the "Emergency Transportation" subtree is completed (i.e., the supplies are delivered), its final node outputs a "task completed" status. At this point, the behavior tree engine, based on the design logic of this interruption type (in this example, "after a high-priority task is completed, low-priority routine tasks are not resumed"), decides to clean up the main task state. It discards the previously saved PendingMainTaskContext and jumps the execution flow to a new task node named Idle, waiting for the next instruction, thus completing the entire interruption handling process.

[0032] In one embodiment of the present invention, the specific process of step S120, "periodically executing the behavior tree through the behavior tree engine to determine the execution flow according to the logical structure of the behavior tree," can be further explained in conjunction with the following description.

[0033] As described in the following steps At the beginning of each execution cycle, the behavior tree engine initiates a traversal from the root node of the behavior tree and passes a token signal representing execution authority as the initial input to the root node; Each parent node in the behavior tree arbitrates the execution order of its child nodes according to its predefined logical rules and passes the token signal to the selected child node; this step is performed recursively until the token signal is passed to a leaf node. The activated leaf nodes execute their encapsulated logic, wherein condition nodes perform status queries and immediately return a success or failure status, and action nodes perform specific tasks and return a running, success, or failure status. The execution status of a child node is output and passed back to its parent node from bottom to top. The parent node determines the current state of the parent node based on its logical rules and the state returned by the child node. Finally, the root node outputs the overall execution status of the behavior tree for this cycle, thereby determining the execution flow of the current cycle.

[0034] It should be noted that this embodiment reveals a data flow-driven decision-making process, the core of which lies in the bidirectional flow of information (tokens and states) within a tree structure. The token signal is a core metaphor, representing the unique execution authority within the current execution cycle. Its unidirectional downward propagation path (from root to leaf) constitutes the control flow, ensuring the orderly progression of logic. Arbitration describes the intelligent decision-making behavior of parent nodes (such as sequence, selection, and parallel nodes). For example, a sequence node arbitrates its child nodes according to "AND" logic, requiring them to execute sequentially; a selection node arbitrates its child nodes according to "OR" logic until one succeeds. The "running, success, or failure" states constitute the state machine of the behavior tree. In particular, the "running" state indicates that an action requires multiple cycles to complete (such as moving a distance), enabling the behavior tree to efficiently manage concurrent and long-running tasks without blocking the entire system. "Bottom-up feedback" constitutes the data flow; the state of child nodes serves as input feedback to the parent node, which then makes new decisions, forming a closed-loop feedback from the execution layer to the decision layer. This is the foundation for the behavior tree to make complex, reactive decisions.

[0035] As an example, the execution mechanism of the behavior tree engine can be implemented through various technical paths. For example, in terms of triggering methods, the "execution cycle" can be driven by a fixed timer (such as 10Hz) or asynchronously triggered by a specific event (such as sensor data update). In terms of node logic, the "predefined logical rules" of the parent node can include, but are not limited to: sequence nodes (execute all child nodes in sequence, and terminate if any fails), rollback nodes (execute child nodes in sequence until one succeeds), parallel nodes (execute all child nodes simultaneously and determine its own state based on success / failure thresholds), etc. In terms of state management, the "running" state returned by the action node can mean that the node internally maintains a continuously iterative optimization calculation process, a control process moving towards the target point, or a blocking process waiting for external service response.

[0036] In a specific implementation, taking a simple task of "discovering and moving towards a target" as an example, the detailed process within one execution cycle is as follows: The behavior tree engine's 50ms timer expires, starting a new cycle. The engine starts from the root node and passes the token to the only child node under the root node—a sequence node. The sequence node receives the token, and its arbitration rule is "execute child nodes sequentially from left to right." It first passes the token to its first child node, a condition node named IsTargetVisible?, which is a leaf node and recursively terminates. The IsTargetVisible? node executes its logic, queries camera data, discovers the target, and then returns a success status to its parent node (sequence node). After receiving the success status of the first child node, the sequence node, according to its rules, passes the token to the second child node, an action node named MoveToTarget. The MoveToTarget node is activated, calls the path planner, and begins moving towards the target. Since movement is a continuous process, it returns a running status to the parent node within this cycle. The sequence node receives the running status of its child node, therefore it also determines itself to be in a running state and returns this status to the root node. The root node ultimately outputs the overall status of this cycle as "Running". Based on this, the engine determines that the task is still in progress and waits for the next cycle to trigger this process again. In the next cycle, due to the memory effect, the sequence node will directly skip the successfully completed condition nodes and continue to pass the token to the MoveToTarget node until it returns success (target reached) or failure (unreachable), thus determining the final execution flow.

[0037] In one embodiment of the present invention, the specific process of "generating a task context corresponding to the current task stage when the execution process triggers a specific path planning action node" in step S130 can be further described in conjunction with the following description.

[0038] As described in the following steps When the path planning action node is triggered, its unique node identifier in the behavior tree is used as input to retrieve the corresponding basic task context template from the pre-configured context template library. The robot's global state information and current environmental perception data are acquired in real time. The basic task context template is fused with the real-time state information, and a task context object containing specific parameter values ​​is dynamically parsed and instantiated. The target description is specified as a coordinate that can be calculated, an object identifier, or a semantic region label. The instantiated task context object, which contains specific planning constraints and target information, is passed to the subsequent dynamic planner selection logic.

[0039] It should be noted that the unique node identifier ensures that different path planning nodes in the behavior tree (such as "fine-grasping path" and "fast-cruise path") can be mapped to different preset templates, achieving precise configuration of task strategies. The context template library extracts the inherent requirements of the task (i.e., "what to do" and "how to do it") from the code logic, turning them into configurable metadata, greatly improving the maintainability and scalability of the system. The dynamic parsing and instantiation describes the transformation process from static templates to runtime objects. The core of this process is the injection of real-time state information, which replaces abstract variables in the template with specific, environment-related values, thereby generating a "living" task context that can be directly used for planning. The semantic region label is a target description method. The robot can understand semantic labels such as "charging station" and "work area A" and query their specific coordinates through the internal database, making task instructions closer to human thinking.

[0040] As an example, the task context generation mechanism is highly flexible and configurable. For instance, in terms of template design, the pre-configured context template can be a JSON-formatted configuration file, a record stored in a database, or a structure defined in the code using the builder pattern. In terms of state information fusion, the real-time acquired global state and environmental perception data can originate from the global state server in the robot's operating system, a dedicated environmental semantic map, or directly subscribed sensor data topics (such as the real-time pose of the target object). In terms of target concretization, resolving the "object identifier" or "semantic region label" into specific coordinates can be achieved by querying a global dictionary that maintains the object-position mapping or by requesting a semantic map service.

[0041] In one specific implementation, an action node named PlanPreciseDropOff in the behavior tree is triggered. The system retrieves the corresponding template from the template library using its node ID (e.g., / MainTask / Transport / PrecisePlace) as the key. The system acquires the following information in real time: the robot's current pose (x=1.5, y=0.8, θ=0.1); the center coordinates of $ASSEMBLY_AREA (x=2.0, y=1.0) obtained from the global semantic map; and the required approach direction $ASSEMBLY_ORIENTATION for this region, θ=0.0 (radians). The variables in the template are replaced with real-time data, generating a fully instantiated TaskContext object (existing in memory as a structure). This instantiated TaskContext object is then passed as output to the next processing unit—the dynamic planner arbitration module—providing all necessary input information for its decision-making.

[0042] In one embodiment of the present invention, the task context further includes at least one of the following information: planning strategy preference, dynamic constraints, task priority, and execution timeout threshold; the specific process of step S140, "dynamically selecting at least one target motion planning algorithm from a plurality of preset motion planning algorithms based on the task context," can be further explained in conjunction with the following description.

[0043] As described in the following steps Analyze the planning strategy preferences and dynamic constraints in the task context; When the planning strategy preference indicates a globally optimal path, the global path planning algorithm is selected as the target motion planning algorithm. When the planning strategy preference indicates local real-time obstacle avoidance, the reactive local planning algorithm is selected as the target motion planning algorithm. When the dynamic constraints include requirements for motion smoothness, an optimization-based path planning algorithm is selected as the target motion planning algorithm.

[0044] It's important to note that "parsing" involves more than just reading data; it's a process of semantic understanding and feature extraction. The system needs to understand the specific meaning of abstract strategies such as the globally optimal path and motion smoothness at the algorithmic level. The planning strategy preferences specify the macroscopic navigation goals (e.g., efficiency, safety), while the dynamic constraints define the microscopic motion characteristics (e.g., smoothness, accuracy). Together, they ensure that the selected algorithm is highly consistent with the task intent at both the macroscopic and microscopic levels. This selection logic is not mutually exclusive. In practical applications, multiple algorithms can be connected in series or parallel to simultaneously satisfy multiple conditions. For example, a global planner can first generate a coarse path, and then an optimization-based planner can smooth that path. Dynamic selection means that the robot can switch its core planning algorithm at different stages of the same task based on changes in context, thereby achieving dynamic reconstruction of behavior patterns and possessing a high degree of situational adaptability.

[0045] As an example, the dynamic selection mechanism can derive multiple decision paths based on complex combinations of task contexts. For instance, in terms of planning strategies, the "globally optimal path" can be implemented using the A* algorithm or Dijkstra's algorithm; "local real-time obstacle avoidance" can be implemented using the dynamic window method or the temporal elastic band algorithm; in terms of dealing with complex constraints, when the task context simultaneously requires both "globally optimal" and "motion smoothness," the system can first call the A* algorithm to generate an initial path, and then call the gradient descent optimizer or spline interpolator once to smooth the path; in terms of priority handling, when the "task priority" indicates urgency, the system may ignore the "motion smoothness" requirement and directly select the fastest planning algorithm, or even adopt a more aggressive obstacle avoidance strategy.

[0046] In a specific implementation, taking a complex task of "quickly traversing an open area and safely passing through a narrow passage" as an example, the detailed process of its dynamic selection algorithm is as follows: In the initial stage of the task, the task context is {strategy: efficiency first, constraint: none}. The system parses the core requirement as "globally optimal path". When the robot approaches the narrow passage, a parallel monitoring condition node is triggered, and the task context is updated to {strategy: safety first, constraint: passage width 0.3 meters}. The system parses the core requirement as "local precise control and obstacle avoidance". Based on the initial context, algorithm A is selected as the target motion planning algorithm. Algorithm A, based on the global map, calculates a shortest path from the starting point to the ending point, traversing the open area. When the robot enters the vicinity of a narrow passage along the A* path, firstly, because the context policy changes to "safety first" and real-time obstacle avoidance is required, the core planner is switched to the temporal elastic band algorithm, which is an algorithm that simultaneously takes into account local obstacle avoidance and motion optimization. After the robot safely passes through the passage, the monitoring condition node detects that the environment has become open again, the task context is reset to the initial state, and then it switches back to the more computationally efficient A* algorithm for subsequent navigation, thus completing a complete context-aware dynamic planner arbitration loop.

[0047] In one embodiment of the present invention, the specific process of step S150, "using the target motion planning algorithm to generate the current motion path instruction and control the desktop wheeled robot to execute it," can be further explained in conjunction with the following description.

[0048] As described in the following steps The target description and dynamic constraints in the task context are used as input to drive the target motion planning algorithm to perform calculations and output a set of original path data representing the path point sequence and motion state. The raw path data is compiled into a sequence of motion primitives through the robot kinematics model and the underlying controller protocol. The sequence of motion primitives constitutes the motion path instruction for the current cycle. The motion primitive sequence is injected into the robot's closed-loop control queue, and the execution status monitoring process bound to the path planning action node is started simultaneously to track the instruction execution progress and the robot's actual pose in real time. The desktop wheeled robot executes the instructions in the closed-loop control queue and feeds back the execution status results to the path planning action node in real time. The node then returns the running, successful, or failed status to the behavior tree engine.

[0049] It's important to note that "raw path data" is the direct output of the planning algorithm. It typically contains a geometric path with a series of (x, y, θ) poses and velocities (v, ω), which cannot be directly understood by the motor and represents high-level instructions. "Compiling" it is not a simple conversion, but a translation process based on the robot's kinematic differential equations and controller characteristics. It translates the geometric path into low-level commands organized in a time sequence that the motor driver can understand. The "motion primitive sequence" is the compiled result, consisting of directly executable atomic operations. For example, a primitive could be "maintain linear velocity v and angular velocity ω within time Δt." The sequence is an ordered set of these primitives, forming a time-velocity profile. The "closed-loop control queue" and the "execution status monitoring process" together constitute a dual-thread mechanism for execution and supervision. The queue ensures the orderly and uninterrupted execution of instructions; while the monitoring process acts like an independent "supervisor," comparing the instructions (expected) with sensor feedback (actual) in real time, forming the foundation for precise control and status feedback. The "return to running, success, or failure status" ultimately closes the "perception-planning-action" control loop at the behavior tree level, enabling high-level task logic to make intelligent decisions based on the actual execution status at the lower level.

[0050] As an example, the generation and execution mechanism of the motion path instructions can be implemented through various technical paths. For example, in data compilation, the compilation process can encapsulate motion primitives through the trajectory_msgs / Trajectory message type in the robot operating system, or through a custom array structure containing timestamps, velocity, and acceleration; in control injection, the closed-loop control queue can be implemented in a real-time control thread and managed through a first-in-first-out buffer, and the execution status monitoring process can achieve pose tracking by subscribing to the odometer topic published by the robot chassis; in status feedback, the conditions for judging "success" or "failure" can be based on whether the error between the robot's actual pose and the target pose is within a threshold, whether the execution timed out, or whether the monitoring process detected an anomaly (such as motor stall).

[0051] In a specific implementation, taking a task of "precisely moving to a certain point" as an example, the task context {goal: (x=2.0, y=1.0), constraint: final orientation of 0 radians} drives the Timed Elastic Band (TEB) planner for calculation. The TEB planner outputs raw path data: a list of 10 path points, each containing (x, y, θ, v, ω, time_from_start). Receiving this raw path data, for a two-wheeled differential-driven desktop robot, its kinematic model is used to extract and encapsulate (v, ω) and time_from_start for each path point, ultimately compiling a sequence of motion primitives. This sequence of motion primitives is injected into the control queue of the robot's underlying motor drivers. Simultaneously, a monitoring process is started, which subscribes to the robot's / odom (odometry) topic and continuously calculates the error between the current robot pose and the current desired pose output by the TEB planner. The robot's motor drivers sequentially retrieve and execute motion primitives from the queue. The monitoring process detects that the pose error remains within acceptable limits (e.g., position error < 0.02m, angle error < 0.1rad). When the last primitive is executed and the robot stabilizes at the target pose, the monitoring process determines the task to be "successful." The "success" status is fed back to the PlanAndExecute path planning action node, which then returns "success" to the behavior tree engine. The engine then knows that the step has been completed and triggers the next node in the behavior tree (e.g., "execute grasp" action). If the monitoring process detects that the robot fails to reach the target within the specified time (e.g., gets stuck), it will report "failure" to the action node, triggering the preset error handling logic in the behavior tree.

[0052] Reference Figure 2 The diagram illustrates a structural block diagram of a motion path planning device for a desktop wheeled robot according to an embodiment of this application, comprising: The task behavior tree loading module 210 is used to load the behavior tree corresponding to the target task when a target task is received. The behavior tree contains a tree-shaped logical structure composed of control flow nodes, condition nodes and action nodes. The behavior tree engine execution module 220 is used to periodically execute the behavior tree through the behavior tree engine to determine the execution flow according to the logical structure of the behavior tree; The task context generation module 230 is used to generate a task context corresponding to the current task stage when the execution process triggers a specific path planning action node. The task context is multi-dimensional structured data containing target description and planning constraints. The dynamic planner arbitration module 240 is used to dynamically select at least one target motion planning algorithm from a plurality of preset motion planning algorithms based on the task context. The motion instruction compilation and execution module 250 is used to generate the current motion path instruction using the target motion planning algorithm and control the desktop wheeled robot to execute it.

[0053] In one embodiment of the present invention, the device further includes: The behavior tree interruption arbitration module is used to pause the currently executing action node and jump to the interruption handling subtree corresponding to the interruption condition when the condition node detects that a preset interruption condition has been triggered. The path planning action nodes contained in the interruption handling subtree use a different task context and / or target motion planning algorithm than the main task.

[0054] In one embodiment of the present invention, the behavior tree interruption arbitration module includes: The first line tree interruption arbitration submodule is used to continuously or periodically monitor the interruption conditions through a monitoring condition node that executes in parallel with the main task subtree. The interruption conditions include, but are not limited to, detecting an emergency obstacle, the robot's battery level being lower than a preset threshold, or receiving a higher priority task instruction. The second behavior tree interruption arbitration submodule is used to immediately suspend the path planning action node or other action node currently being executed in the main task subtree and record its current execution status when the monitoring condition node detects that the interruption condition has been triggered and returns a success status. The third behavior tree interrupt arbitration submodule is used by the behavior tree engine to jump the execution flow to a predefined interrupt handling subtree bound to the specific interrupt condition, and to start executing the nodes in that subtree; The fourth behavior tree interrupt arbitration submodule is used to automatically restore the previously suspended main task subtree node and continue execution, or clear the main task state and jump to a new task node, according to the interrupt handling subtree after the interrupt handling subtree has been executed.

[0055] In one embodiment of the present invention, the behavior tree engine execution module 220 includes: The first behavior tree engine execution submodule is used by the behavior tree engine to initiate a traversal from the root node of the behavior tree at the beginning of each execution cycle, and pass a token signal representing execution authority as the initial input to the root node; The second behavior tree engine execution submodule is used to arbitrate the execution order of its child nodes according to the predefined logical rules of each parent node in the behavior tree, and to pass the token signal to the selected child node; this step is performed recursively until the token signal is passed to a leaf node. The third line is the tree engine execution submodule, which is used by the activated leaf nodes to execute the logic they encapsulate, wherein the condition nodes perform status queries and immediately return a success or failure status, and the action nodes perform specific tasks and return a running, success, or failure status. The fourth behavior tree engine execution submodule is used to output the execution status of child nodes and send it back to their parent nodes from bottom to top. The parent node determines the current state of the parent node based on its logical rules and the state returned by the child nodes. Finally, the root node outputs the overall execution status of the behavior tree for this cycle, thereby determining the execution flow of the current cycle.

[0056] In one embodiment of the present invention, the task context generation module 230 includes: The first task context generation submodule is used to retrieve the corresponding basic task context template from the pre-configured context template library when the path planning action node is triggered, using its unique node identifier in the behavior tree as input. The second task context generation submodule is used to acquire the robot's global state information and current environmental perception data in real time, fuse the basic task context template with the real-time state information, and dynamically parse and instantiate a task context object containing specific parameter values; wherein, the target description is specified as a coordinate that can be calculated, an object identifier or a semantic region label. The third task context generation submodule is used to pass the instantiated task context object, which contains specific planning constraints and target information, to the subsequent dynamic planner selection logic.

[0057] In one embodiment of the present invention, the dynamic planner arbitration module 240 includes: The first dynamic planner arbitration submodule is used to parse the planning strategy preferences and dynamic constraints in the task context; The second dynamic planner arbitration submodule is used to select the global path planning algorithm as the target motion planning algorithm when the planning strategy preference indicates a globally optimal path. The third dynamic planner arbitration submodule is used to select the reactive local planning algorithm as the target motion planning algorithm when the planning strategy preference indication is local real-time obstacle avoidance. The fourth dynamic planner arbitration submodule is used to select an optimization-based path planning algorithm as the target motion planning algorithm when the dynamic constraints include requirements for motion smoothness.

[0058] In one embodiment of the present invention, the motion instruction compilation and execution module 250 includes: The first motion instruction compilation and execution submodule is used to take the target description and dynamic constraints in the task context as input, drive the target motion planning algorithm to perform calculations, and output a set of native path data representing the path point sequence and motion state. The second motion instruction compilation and execution submodule is used to compile the original path data into a motion primitive sequence through the robot kinematics model and the underlying controller protocol. The motion primitive sequence constitutes the motion path instruction for the current cycle. The third motion instruction compilation and execution submodule is used to inject the motion primitive sequence into the robot's closed-loop control queue and simultaneously start the execution status monitoring process bound to the path planning action node, which is used to track the instruction execution progress and the robot's actual pose in real time. The fourth motion instruction compilation and execution submodule is used by the desktop wheeled robot to execute the instructions in the closed-loop control queue and feed back the execution status results to the path planning action node in real time. Based on this, the node returns the running, success or failure status to the behavior tree engine.

[0059] Reference Figure 3 The diagram illustrates a computer electronic device for implementing a motion path planning method for a desktop wheeled robot according to the present invention, which may specifically include the following: The aforementioned computer device 1 is in the form of a general-purpose computing device. The components of the computer device 1 may include, but are not limited to: one or more processors or processing units 3, memory 8, and a bus 4 connecting different system components (including memory 8 and processing unit 3).

[0060] Bus 4 represents one or more of several bus architectures, including memory buses or memory controllers, peripheral buses, graphics acceleration ports, processors, or local buses using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Audio / Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0061] Computer device 1 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 1, including volatile and non-volatile media, removable and non-removable media.

[0062] Memory 8 may include computer system readable media in the form of volatile memory, such as random access memory 9 and / or cache memory 10. Computer device 1 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 11 may be used to read and write non-removable, non-volatile magnetic media (commonly referred to as a "hard disk drive"). Although Figure 3 As not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 4 via one or more data media interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 13 configured to perform the functions of the embodiments of this application.

[0063] A program / utility 12 having a set (at least one) of program modules 13 may be stored, for example, in memory. Such program modules 13 include—but are not limited to—an operating system, one or more application programs, other program modules 13, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 13 typically perform the functions and / or methods described in the embodiments of this application.

[0064] Computer device 1 can also communicate with one or more external devices 2 (e.g., keyboard, pointing device, monitor 7, camera, etc.), and with one or more devices that enable an operator to interact with computer device 1, and / or with any device that enables computer device 1 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through I / O interface 6. Furthermore, computer device 1 can also communicate with one or more networks (e.g., local area network (LAN)), wide area network (WAN), and / or public networks (e.g., the Internet) through network adapter 5. Figure 3 As shown, network adapter 5 communicates with other modules of computer device 1 via bus 4. It should be understood that, although... Figure 3 Not shown, it can be combined with computer device 1 to use other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing unit 3, external disk drive array, RAID system, tape drive and data backup storage system 11, etc.

[0065] The processing unit 3 executes various functional applications and data processing by running programs stored in memory 8, such as implementing a motion path planning method for a desktop wheeled robot provided in the embodiments of this application.

[0066] That is, when the processing unit 3 executes the above program, it performs the following: when a target task is received, it loads the behavior tree corresponding to the target task, the behavior tree containing a tree-shaped logical structure composed of control flow nodes, condition nodes, and action nodes; it periodically executes the behavior tree through the behavior tree engine to determine the execution flow according to the logical structure of the behavior tree; when the execution flow triggers a specific path planning action node, it generates a task context corresponding to the current task stage, the task context being multi-dimensional structured data containing target descriptions and planning constraints; based on the task context, it dynamically selects at least one target motion planning algorithm from a plurality of preset motion planning algorithms; it uses the target motion planning algorithm to generate the current motion path instruction and controls the desktop wheeled robot to execute it.

[0067] In this application embodiment, the application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a motion path planning method for a desktop wheeled robot as provided in all embodiments of the application.

[0068] That is, when the program is executed by the processor, the following is implemented: When a target task is received, a behavior tree corresponding to the target task is loaded. The behavior tree contains a tree-like logical structure composed of control flow nodes, condition nodes, and action nodes. The behavior tree is periodically executed by the behavior tree engine to determine the execution flow based on the logical structure of the behavior tree. When the execution flow triggers a specific path planning action node, a task context corresponding to the current task stage is generated. The task context is multi-dimensional structured data containing target descriptions and planning constraints. Based on the task context, at least one target motion planning algorithm is dynamically selected from multiple preset motion planning algorithms. The target motion planning algorithm is used to generate the current motion path instruction and control the desktop wheeled robot to execute it.

[0069] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0070] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0071] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof. These programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the operator's computer, partially on the operator's computer, as a standalone software package, partially on the operator's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the operator's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider). The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably.

[0072] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.

[0073] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0074] The above provides a detailed description of the motion path planning method and apparatus for a desktop wheeled robot provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A motion path planning method for a desktop wheeled robot, characterized in that, Including the following steps: When a target task is received, the behavior tree corresponding to the target task is loaded. The behavior tree contains a tree-shaped logical structure consisting of control flow nodes, condition nodes, and action nodes. The behavior tree engine periodically executes the behavior tree to determine the execution flow based on the logical structure of the behavior tree. When the execution process triggers a specific path planning action node, a task context corresponding to the current task stage is generated. The task context is multi-dimensional structured data containing target descriptions and planning constraints. Based on the task context, at least one target motion planning algorithm is dynamically selected from a plurality of preset motion planning algorithms; The target motion planning algorithm is used to generate the current motion path instruction and control the desktop wheeled robot to execute it.

2. The motion path planning method for a desktop wheeled robot according to claim 1, characterized in that, The condition nodes in the behavior tree are configured to monitor robot status or environmental information in real time. The method further includes the following steps: When the condition node detects that a preset interruption condition has been triggered, the behavior tree engine pauses the currently executing action node and jumps to execute the interruption handling subtree corresponding to the interruption condition; The path planning action nodes contained in the interrupt handling subtree use a different task context and / or target motion planning algorithm than the main task.

3. The motion path planning method for a desktop wheeled robot according to claim 2, characterized in that, When the condition node detects that a preset interruption condition has been triggered, the behavior tree engine pauses the currently executing action node and jumps to execute the interruption handling subtree corresponding to the interruption condition. Specifically, this includes the following steps: The interruption conditions are continuously or periodically monitored through a monitoring condition node that executes in parallel with the main task subtree. The interruption conditions include, but are not limited to, detecting an emergency obstacle, the robot's battery level being lower than a preset threshold, or receiving a higher priority task instruction. When the monitoring condition node detects that the interruption condition has been triggered and returns a success status, the behavior tree engine immediately suspends the path planning action node or other action node that is currently being executed in the main task subtree and records its current execution status. The behavior tree engine will jump the execution flow to a predefined interrupt handling subtree bound to the specific interrupt condition, and begin executing the nodes in that subtree; After the interrupt handling subtree is completed, the behavior tree engine automatically restores the previously suspended main task subtree node and continues execution, or clears the main task state and jumps to a new task node, depending on the interrupt type and design.

4. The motion path planning method for a desktop wheeled robot according to claim 1, characterized in that, The step of periodically executing the behavior tree through the behavior tree engine to determine the execution flow based on the logical structure of the behavior tree specifically includes the following steps: At the beginning of each execution cycle, the behavior tree engine initiates a traversal from the root node of the behavior tree and passes a token signal representing execution authority as the initial input to the root node. Each parent node in the behavior tree arbitrates the execution order of its child nodes according to its predefined logical rules and passes the token signal to the selected child node. This step is performed recursively until the token signal is delivered to a leaf node; The activated leaf nodes execute their encapsulated logic, wherein condition nodes perform status queries and immediately return a success or failure status, and action nodes perform specific tasks and return a running, success, or failure status. The execution status of a child node is output and passed back to its parent node from bottom to top. The parent node determines the current state of the parent node based on its logical rules and the state returned by the child node. Finally, the root node outputs the overall execution status of the behavior tree for this cycle, thereby determining the execution flow of the current cycle.

5. The motion path planning method for a desktop wheeled robot according to claim 1, characterized in that, The step of generating a task context corresponding to the current task stage when the execution process triggers a specific path planning action node specifically includes the following steps: When the path planning action node is triggered, its unique node identifier in the behavior tree is used as input to retrieve the corresponding basic task context template from the pre-configured context template library. The robot's global state information and current environmental perception data are acquired in real time. The basic task context template is fused with the real-time state information, and a task context object containing specific parameter values ​​is dynamically parsed and instantiated. The target description is specified as a coordinate that can be calculated, an object identifier, or a semantic region label. The instantiated task context object, which contains specific planning constraints and target information, is passed to the subsequent dynamic planner selection logic.

6. The motion path planning method for a desktop wheeled robot according to claim 1, characterized in that, The task context also includes at least one of the following: planning strategy preference, dynamic constraints, task priority, and execution timeout threshold. The step of dynamically selecting at least one target motion planning algorithm from a plurality of preset motion planning algorithms based on the task context specifically includes the following steps: Analyze the planning strategy preferences and dynamic constraints in the task context; When the planning strategy preference indicates a globally optimal path, the global path planning algorithm is selected as the target motion planning algorithm. When the planning strategy preference indicates local real-time obstacle avoidance, the reactive local planning algorithm is selected as the target motion planning algorithm. When the dynamic constraints include requirements for motion smoothness, an optimization-based path planning algorithm is selected as the target motion planning algorithm.

7. The motion path planning method for a desktop wheeled robot according to claim 1, characterized in that, The step of generating the current motion path instruction using the target motion planning algorithm and controlling the desktop wheeled robot to execute it specifically includes the following steps: The target description and dynamic constraints in the task context are used as input to drive the target motion planning algorithm to perform calculations and output a set of original path data representing the path point sequence and motion state. The raw path data is compiled into a sequence of motion primitives through the robot kinematics model and the underlying controller protocol. The sequence of motion primitives constitutes the motion path instruction for the current cycle. The motion primitive sequence is injected into the robot's closed-loop control queue, and the execution status monitoring process bound to the path planning action node is started simultaneously to track the instruction execution progress and the robot's actual pose in real time. The desktop wheeled robot executes the instructions in the closed-loop control queue and feeds back the execution status results to the path planning action node in real time. The node then returns the running, successful, or failed status to the behavior tree engine.

8. A motion path planning device for a desktop wheeled robot, characterized in that, include: The task behavior tree loading module is used to load the behavior tree corresponding to the target task when a target task is received. The behavior tree contains a tree-shaped logical structure composed of control flow nodes, condition nodes and action nodes. The behavior tree engine execution module is used to periodically execute the behavior tree through the behavior tree engine to determine the execution flow based on the logical structure of the behavior tree; The task context generation module is used to generate a task context corresponding to the current task stage when the execution process triggers a specific path planning action node. The task context is multi-dimensional structured data containing target description and planning constraints. The dynamic planner arbitration module is used to dynamically select at least one target motion planning algorithm from a plurality of preset motion planning algorithms based on the task context. The motion instruction compilation and execution module is used to generate the current motion path instruction using the target motion planning algorithm and control the desktop wheeled robot to execute it.

9. A computer electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Aircraft autonomous decision-making method based on finite-state machine and behavior tree hybrid architecture

    CN121763782A