A Multi-Task Path Planning Method for a Self-Balancing Bicycle Robot
By employing a multi-task path planning method for self-balancing bicycle robots, the problems of dynamic stability and multi-task coordination of self-balancing bicycle robots in complex environments are solved. A global path that satisfies both dynamic stability and environmental safety is generated, thereby improving the robot's operational performance and safety in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU DIANZI UNIV
- Filing Date
- 2026-03-27
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies for path planning in self-balancing bicycle robots suffer from problems such as disconnection of dynamic stability, poor multi-task integration, poor environmental obstacle avoidance safety, and mismatch between local planning and the physical characteristics of the bicycle, which cannot meet the multi-task operation requirements in complex unstructured environments.
A multi-task path planning method for self-balancing bicycle robots is adopted. By combining environmental modeling and safety potential field construction with multi-task topology deduction and bidirectional global path search of hybrid primitives, a global path that satisfies dynamic stability and environmental safety is generated. Geometric continuity optimization and dynamic stability verification are performed to eliminate unstable commands and ensure the robot's smooth movement in complex environments.
The self-balancing bicycle robot has achieved dynamic stability, multi-task smoothness, and environmental obstacle avoidance safety in complex environments, thus improving the robot's operational performance and safety in complex environments.
Smart Images

Figure CN121918580B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a multi-task path planning method for a self-balancing bicycle robot with dynamic stability constraints, belonging to the field of autonomous navigation and path planning technology for mobile robots. Background Technology
[0002] With the rapid development of mobile robot technology, self-balancing bicycle robots have become a research hotspot in the field of robotics due to their advantages such as small physical envelope and strong ability to navigate narrow paths. Self-balancing bicycle robots belong to a nonholonomic, strongly coupled, and underactuated inverted pendulum system, and their path planning and autonomous navigation face numerous technical challenges.
[0003] Existing technologies generally employ a hierarchical planning framework of "global path search + local dynamic obstacle avoidance." Global planning often uses A* and its variants, while local planning commonly uses the Dynamic Window (DWA) method. However, when applying existing technologies to self-balancing bicycle robots, the following prominent technical drawbacks exist:
[0004] 1. Disconnect between path planning and underlying dynamic stability: Traditional algorithms simplify the robot to a point mass or geometric contour, only considering kinematic collision-free constraints, and failing to couple the dynamic roll stability of the self-balancing robot. If the curvature or velocity of the planned trajectory exceeds the robot's physical equilibrium limits, it can easily lead to instability and tipping over when cornering or avoiding obstacles.
[0005] 2. Defects in multi-task topology integration: When executing multi-sequential target point tasks, existing technologies plan each sub-task independently, lacking forward-looking topology extrapolation. This leads to problems such as tangential heading mismatch and frequent pose adjustments for the robot at intermediate target points. Since self-balancing bicycle robots lack the ability to turn in place, this defect severely reduces operational efficiency and riding smoothness.
[0006] 3. Lack of proactive safety guidance mechanisms for obstacle avoidance: Traditional cost maps rely on obstacle expansion to generate paths that hug the edges of obstacles. For bicycle robots with dynamic tilting characteristics, driving close to the edges not only increases the risk of collisions but also compresses the dynamic safety space for wheel balance adjustment. Existing technologies cannot guide the robot to travel safely along the free space skeleton line.
[0007] 4. Mismatch between local programming algorithms and bicycle physics: Traditional DWA algorithms are applicable to differential drive robots, assuming the robot has the ability to turn in place, and do not consider the inherent relationship between the front wheel angle and the vehicle's balance. This algorithm cannot evaluate the roll angle and roll rate corresponding to the sampled command, and the output command may cause the robot to avoid obstacles but become unstable due to excessive roll.
[0008] The aforementioned shortcomings mean that existing technologies cannot meet the needs of self-balancing bicycle robots for multi-task operation in complex unstructured environments. There is an urgent need for a path planning method that takes into account dynamic stability, smooth multi-task transitions, and environmental obstacle avoidance safety. Summary of the Invention
[0009] To overcome the shortcomings of existing self-balancing bicycle robots, such as disconnect between path planning and dynamics, poor multi-task integration, poor obstacle avoidance safety, and mismatch between local planning and body characteristics, this invention provides a multi-task path planning method for self-balancing bicycle robots, which improves the robot's performance in complex environments.
[0010] A multi-task path planning method for a self-balancing bicycle robot includes the following steps:
[0011] Step 1: Environmental Modeling and Safety Potential Field Construction: Establish an environmental grid model containing static obstacle distribution information, construct a generalized Venn diagram based on the grid model, and extract free space skeleton lines; calculate the Euclidean distance from each node to the nearest obstacle, and fuse the nonlinear repulsive force function of the obstacle with the skeleton guiding gravity function to generate the environmental safety potential field distribution;
[0012] Step 2: Multi-task topology deduction and boundary constraint setting: Receive a task sequence containing the initial pose and multiple sequential task target points, and identify intermediate task nodes; analyze the geometric positions and topological connection trends of adjacent task target points, and deduce the optimal entry heading angle of the intermediate target point; bind the optimal entry heading angle to the target point coordinates to form a position-attitude dual boundary constraint; execute priority determination and state inheritance strategies to determine the start and end boundary conditions of each sub-task path planning.
[0013] Step 3: Bidirectional Global Path Search Based on Hybrid Primitives: Construct a three-dimensional discrete state space containing x-coordinate, y-coordinate, and heading angle. Based on the environmental safety potential field and boundary constraints, perform node search using an improved hybrid A* algorithm. During the search process, perform discrete extension based on kinematic model and analytical extension based on Reeds-Shepp curve in parallel. Combine adaptive firing frequency and optimality preservation mechanism to generate a global basic path that satisfies the minimum turning radius constraint and is collision-free.
[0014] Based on the potential field distribution and boundary constraints, a node search considering the nonholonomic kinematics constraints of the bicycle robot is performed in the three-dimensional state space (x, y, theta). During the search process, bidirectional motion primitives containing forward and backward modes are used to expand the nodes, and a global basic path that satisfies the minimum turning radius constraint and is collision-free is generated by combining the Reeds-Shepp curve generation strategy.
[0015] Step 4: Geometric Continuity and Nonlinear Optimization of the Global Path: Post-processing is performed on the global basic path: commutation cusps are identified in the global basic path, and commutation buffers are constructed based on the vehicle body geometry; the path is decomposed and resampled using the commutation cusps as dividing points to construct a nonlinear objective function that includes smoothness cost, path length cost, and obstacle repulsion cost; a dual safety constraint combining soft and hard approaches is adopted, and the path point coordinates are iteratively optimized using a gradient descent algorithm to generate a globally reference trajectory with continuous curvature;
[0016] Step 5: Local dynamic programming with dynamic stability verification: During the robot's tracking of the global reference trajectory, a dynamic window sampling space containing linear velocity and front wheel rotation angle is constructed; the inverted pendulum dynamic model of the self-balancing bicycle robot is introduced as a stability filter to calculate the predicted roll angle and roll angle change rate corresponding to each sampling command, and sampling commands that exceed the physical equilibrium limit and momentum wheel torque limit are eliminated; combining the asymmetric kinematic constraint window and the topological horizon truncation mechanism, the optimal control command is selected to drive the robot's motion based on the multivariate evaluation function within the effective velocity space.
[0017] The specific process of establishing the environmental grid model in step one is as follows: receiving raw environmental data collected by sensors and mapping it into a two-dimensional grid matrix; generating a binary map based on the state of grid occupancy; for the free passage area of the binary map, using a distance transformation algorithm to calculate the minimum Euclidean distance from each free node to the nearest obstacle node, generating an Euclidean distance field; identifying the set of local maxima in the Euclidean distance field, extracting the topological central axis of free space, and generating a generalized Vinograph skeleton that reflects the maximum passage gap in the environment.
[0018] The specific steps in step one of generating the environmental safety potential field distribution include: constructing a nonlinear repulsion function to map the distance values in the Euclidean distance field to the obstacle repulsion cost, so that the closer the region is to the obstacle, the higher the cost value, and assigning an infinite cost to form a virtual wall when the distance is less than a set safety threshold; constructing a skeleton-guided gravity function to assign the lowest potential energy cost value to the generalized Vinograph skeleton region to form a potential energy valley; and weighted superposition of the obstacle repulsion cost and the skeleton-guided gravity function to generate the final environmental safety potential field, so as to guide the subsequent path search algorithm to preferentially extend along the skeleton line away from the obstacle.
[0019] The specific process of multi-task topology deduction and boundary constraint setting in step two is as follows: traverse the sequence of task target points and identify intermediate task nodes that simultaneously serve as the end point of the current road segment and the starting point of the next road segment; for each intermediate task node, perform a low-dimensional geometric path pre-search from the current node to the subsequent adjacent task nodes in the two-dimensional grid map to generate a collision-free geometric guidance path; select a path point on the geometric guidance path that is a set look-ahead distance from the current node, calculate the topological tangential direction from the current node to the path point, and define it as the optimal cutting heading angle for the end point of the current task road segment; analyze the orientation angle of the node's position vector in the global coordinate system, and define it as the optimal cutting heading angle for the current road segment; bind the optimal cutting heading angle to the coordinates of the intermediate task node to generate a target state with position-attitude dual constraints.
[0020] Specifically, intermediate node look-ahead analysis: traverse the sequence of task target points and identify intermediate task nodes that simultaneously serve as the end point of the current road segment and the starting point of the next road segment;
[0021] Geometric topology trend calculation: For each intermediate task node, calculate the position vector from that node to the subsequent adjacent task nodes, analyze the direction angle of this vector in the global coordinate system, and define it as the optimal cutting heading angle for the current road segment navigation;
[0022] Boundary constraint locking: The optimal entry heading angle is bound to the coordinate position of the intermediate task node, generating a target state with both position and attitude constraints. This forces the path planning algorithm to ensure that the vehicle's orientation remains collinear with the subsequent direction of travel when reaching the node, thus eliminating the need for in-situ turning during task switching.
[0023] When generating the target state, a priority determination and state inheritance strategy needs to be executed. The priority determination and state inheritance strategy includes: the system checks whether there is a user-manually specified forced arrival angle in the task sequence. If so, the user instruction is used as the highest priority boundary constraint. When executing multi-segment continuous task planning, the terminal pose state of the previous segment is directly used as the starting state of the next segment to ensure that the geometric positions of adjacent task segments coincide and the tangential direction is continuous.
[0024] Specifically, the following priority determination and state inheritance strategy also need to be executed when generating the target state:
[0025] Priority determination: The system checks whether the task sequence contains a user-specified forced arrival angle; if a user-specified angle exists, the automatically calculated geometric topology orientation angle is overridden, and the user instruction is used as the highest priority boundary constraint.
[0026] State inheritance and initialization: When performing multi-segment continuous task planning, the terminal pose state (including coordinates, heading angle and instantaneous curvature) after the previous segment is completed is directly used as the starting state for the next segment planning, ensuring that adjacent task segments meet the requirements of geometric position coincidence and tangential direction continuity at the connection point, and realizing a smooth transition of the entire multi-task process.
[0027] The specific execution process of the improved hybrid A* algorithm in step three is as follows: Initialize a priority queue sorted by comprehensive cost value and add the starting state node to the queue; take out the current node with the lowest cost value from the queue and perform discrete expansion and analytical expansion in parallel; the discrete expansion is based on the minimum turning radius of the bicycle robot and the geometric constraints of the vehicle body, and generates child nodes that satisfy nonholonomic constraints in forward and backward modes along the maximum left turn, straight line, and maximum right turn directions; the analytical expansion periodically attempts to construct a collision-free Reeds-Shepp curve connecting the current node and the target state node.
[0028] Specifically, this includes constructing a three-dimensional discrete state space: introducing the heading angle dimension on the basis of a two-dimensional grid map, discretizing the robot's state space into a three-dimensional grid index containing the horizontal coordinate, the vertical coordinate, and the heading angle;
[0029] Initialize the search queue: Establish a priority queue sorted by comprehensive cost value, and add the starting state node to the queue;
[0030] Bimodal node expansion loop: The current node with the lowest cost is taken from the priority queue and the discrete expansion based on the kinematic model and the analytical expansion based on the Reeds-Shepp curve are executed in parallel.
[0031] Discrete extended mode: Based on the minimum turning radius and body geometry constraints of the bicycle robot, a set of sub-nodes satisfying nonholonomic constraints are generated in both forward and backward modes along the three directions of maximum left turn, straight line, and maximum right turn.
[0032] Analytical extended modality (shooting mechanism): During the search process, it periodically attempts to construct a collision-free Reeds-Shepp curve that directly connects the current node and the target state node in order to quickly converge to the target region.
[0033] The adaptive frequency adjustment and optimality preservation mechanism of the analytical expansion includes: calculating the Euclidean distance between the current node and the target point in real time; increasing the analytical expansion frequency when the distance is less than a preset near-field threshold and decreasing the frequency when the distance is greater than the threshold; after generating a feasible Reeds-Shepp path through analytical expansion, calculating the total cost of the path and recording it as the current optimal solution, and updating the upper bound of the global search cost; continuing to expand nodes whose estimated cost is lower than the upper bound until the queue is empty or the theoretical minimum cost of the remaining nodes exceeds the current optimal solution, at which point the search is terminated.
[0034] Specifically, this includes adaptive firing frequency: calculating the Euclidean distance between the current node and the target point in real time during the search process; if the distance is less than a preset near-field threshold, increasing the frequency of analytical expansion attempts to perform high-density, precise docking when approaching the target; if the distance is greater than the threshold, decreasing the frequency of attempts to reduce invalid calculations in open areas.
[0035] Optimality preservation strategy: When the parsing expansion successfully generates a collision-free Reeds-Shepp path, the search is not terminated immediately. Instead, the total cost of the complete path is calculated and recorded as the "current optimal solution".
[0036] Convergence and pruning: Update the upper bound of the global search cost to the cost of the current optimal solution; continue to expand the nodes in the priority queue whose estimated cost is lower than the upper bound, and set an additional upper limit for the number of iterations or a stability counter for the solution; only terminate the search and output the final global path when the queue is empty or the theoretical minimum cost of all remaining nodes exceeds the current optimal solution, thereby approximating the global optimal solution while ensuring computational efficiency.
[0037] The comprehensive cost of the priority queue includes environmental safety potential field cost and dual hybrid heuristic cost: when calculating the cumulative cost of a node, the cost of the generalized Vinograph potential field is introduced as the environmental risk cost and added to the path length cost; when calculating the estimated cost of a node, the Reeds-Shepp incomplete kinematic distance and the obstacle avoidance distance based on BFS are calculated simultaneously, and the maximum value of the two is taken as the heuristic cost.
[0038] Specifically, this includes Voronoi potential field guidance: when calculating the cumulative cost (G value) of a node, a potential field distribution map generated based on a generalized Veno diagram is introduced; the cost value of the current node in the potential field is queried and added to the path length cost as an environmental risk cost, so that the generated path is geometrically inclined to move away from obstacles and extend along the skeleton line of free space.
[0039] Dual hybrid heuristic function: When calculating the estimated cost (H value) from a node to a target, the incomplete kinematic distance (Reeds-Shepp distance) and the obstacle avoidance distance based on breadth-first search (BFS) are calculated simultaneously; the maximum value of the two is taken as the final heuristic cost, so as to balance the guidance of the vehicle's minimum turning radius and the avoidance of U-shaped traps or dead ends.
[0040] The specific process of global path geometric continuity processing and nonlinear optimization in step four is as follows: using the commutation cusp as the dividing point, the global path is decomposed into unidirectional motion segments and resampled at high resolution; a nonlinear objective function containing smoothness cost, obstacle repulsion cost and path length cost is constructed; the path point coordinates are iteratively adjusted using the constrained gradient descent algorithm to generate a curvature-continuous global reference trajectory.
[0041] Specifically, this includes path segmentation and resampling: using the turning cusp in the path as the dividing point, the global path is decomposed into several unidirectional motion sub-segments, and each sub-segment is resampled using high-resolution linear interpolation to increase the degree of freedom in path optimization.
[0042] Construction of nonlinear energy function: Construct a comprehensive objective function that includes smoothness cost, obstacle repulsion cost, and path length cost;
[0043] Constrained gradient descent: The gradient descent algorithm is used to calculate the negative gradient direction of the objective function with respect to the coordinates of the path points, and the positions of the path points are iteratively adjusted to make the path geometrically smoother and farther away from obstacles.
[0044] The combined soft and hard safety constraints of the restricted gradient descent include: soft constraints achieved through the obstacle repulsion cost in the objective function, guiding path points away from obstacles; and hard constraints achieved by performing forward collision detection before each iteration and locking the coordinates if the path point falls into the obstacle expansion region after moving.
[0045] Specifically, this includes soft constraint repulsion: using the obstacle repulsion cost in the objective function, the environmental potential field is used to guide the path point to move away from the obstacle;
[0046] Hard constraint locking: Before each iteration update, perform forward collision detection. If the new coordinates of a path point after moving along the gradient direction fall into the obstacle expansion region, then abandon the current update of that point and lock its coordinates unchanged to prevent the smoothing algorithm from destroying the collision-free characteristics of the path.
[0047] The process of constructing the reversing buffer zone is as follows: for each reversing apex, a straight buffer path is extended along the tangent direction before reversing; the length of the buffer path is set according to the wheelbase of the robot's front and rear wheels and the total length of the robot body to ensure that the entire robot body enters the safe area when reversing.
[0048] Specifically, this includes, before path segmentation, the construction of a reversal buffer based on vehicle body geometry is required.
[0049] Commutation space compensation: For each commutation tip, a straight buffer path is extended along the tangent direction before commutation;
[0050] Geometric feasibility verification: The length of the buffer path is set based on the wheelbase of the robot's front and rear wheels and the overall length of the vehicle body. This is intended to ensure that when the robot reaches the reversing point and performs a gear shift, its overall geometric profile has completely entered the safe zone, thereby eliminating the risk of collision during state transition caused by the rear of the vehicle lagging behind the steering center.
[0051] In step five, the dynamic stability verification adopts a trajectory pruning strategy based on the inverted pendulum dynamic manifold: after generating the control command set by sampling in the velocity space, the predicted roll angle and roll angle change rate corresponding to each command are calculated using the inverted pendulum dynamic equation; physical constraint boundaries of the maximum safe roll angle and the momentum wheel torque response bandwidth are constructed, and instability commands that exceed the constraints are eliminated.
[0052] Specifically, this includes local dynamic programming with dynamic stability verification, employing a trajectory pruning strategy based on the inverted pendulum dynamic manifold:
[0053] When generating control command sets by sampling in velocity space, the dynamic roll angle and roll velocity required to maintain the balance of the bicycle robot are calculated analytically using the inverted pendulum dynamic equation of the bicycle robot.
[0054] Construct physical constraint boundaries that include the maximum safe tilt angle and the torque response bandwidth of the momentum wheel; perform dynamic feasibility verification on the predicted trajectory, and identify instructions that cause the state variables to exceed the physical constraint boundaries as unstable singular solutions and remove them from the feasible solution space to ensure that the planning output always remains within the robot's dynamic stability domain.
[0055] To address the structural instability of a self-balancing bicycle robot during reverse motion, an asymmetric kinematic constraint window is constructed. The construction process of the asymmetric kinematic constraint window is as follows: establishing a parameter loading mechanism coupled with the global path motion direction; and loading standard kinematic parameters to optimize maneuverability in forward mode.
[0056] In reversing mode, the system automatically switches to a high-damping kinematic parameter set to suppress the linear velocity amplitude and angular acceleration nonlinearly, thereby compensating for the negative stability gain of the rear-wheel steering system when reversing at low speeds and ensuring chassis stability during reversing into a parking space or fine-tuning of the posture.
[0057] A topology-index-truncation-based view boundary management and dual-state switching mechanism are integrated to achieve robust tracking of discontinuous path segments. The topology view boundary management and dual-state switching mechanism includes:
[0058] Topological horizon truncation: When the robot approaches the reversing cusp along the current path segment, the upper limit of the local planner's reference target search window is forcibly locked at the cusp index, shielding the gravitational field interference of the subsequent reverse path segment of the cusp, and forcing the system state to monotonically converge toward the cusp position in the phase space.
[0059] Dual state switching: Construct a logic OR gate trigger that includes a precise convergence criterion and a stagnation escape criterion; when the robot pose meets the high-precision threshold, or when it is in a long-term low-speed equilibrium motion stagnation state in the cusp neighborhood, trigger the logic flip of the navigation state machine, release the field of view lock and push the path index, ensuring that the robot can smoothly transition from various non-ideal approximation states to the next motion stage.
[0060] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0061] Achieving deep coupling between dynamics and path planning: This invention introduces an inverted pendulum dynamics model as a stability filter to verify the tilt angle and momentum wheel torque corresponding to the sampling command in real time, and eliminates unstable commands. This solves the problem of robot instability caused by traditional algorithms that only consider kinematic constraints, and improves the inherent safety of robot motion in complex environments.
[0062] To address the issue of poor topology integration in multi-task operations: By setting dual boundary constraints of position and attitude through multi-task topology deduction and combining them with a state inheritance strategy, we ensure that the geometric positions of adjacent task segments coincide and the tangential direction is continuous. This eliminates the robot's in-situ turning motion at intermediate target points, significantly improving the efficiency and smoothness of multi-task operations.
[0063] Improving the safety and reliability of obstacle avoidance in the environment: Based on the environmental safety potential field constructed by the generalized Venn diagram, the robot is guided to travel along the free space skeleton line, avoiding the defects of traditional algorithms that drive along the edge, increasing the safety clearance of robot movement, and reducing the collision risk during dynamic tilting.
[0064] Adapting local planning to bicycle characteristics: To address the nonholonomic constraints and differences in forward / backward modal characteristics of the self-balancing bicycle robot, an asymmetric kinematic constraint window is constructed. Combined with a topological horizon management mechanism, this solves the problem of mismatch between the traditional DWA algorithm and the characteristics of the bicycle itself, ensuring robust tracking of the global trajectory.
[0065] This invention is the first to propose a path planning architecture that deeply integrates the generalized Vinograph potential field, multi-task topology derivation and inverted pendulum dynamics model. It also innovatively designs an adaptive expansion mechanism for bidirectional search of hybrid primitives, a method for constructing a reversal buffer, and a dual state switching logic, which are fundamentally different from existing technologies.
[0066] This invention addresses the unique structure and motion characteristics of self-balancing bicycle robots, overcoming the technical limitations of traditional path planning that emphasizes kinematics over dynamics and single-task integration over multi-task coordination. It achieves synergistic optimization of dynamic stability, multi-task smoothness, and environmental adaptability, resulting in significantly superior technical performance compared to existing technologies.
[0067] This invention can be directly applied to the autonomous navigation system of a self-balancing bicycle robot without additional hardware costs, and has broad application prospects in scenarios such as warehousing and logistics, indoor inspection, and operation in confined spaces. Attached Figure Description
[0068] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0069] Figure 1 This is a system framework diagram of a multi-task path planning method for a self-balancing bicycle robot according to the present invention.
[0070] Figure 2 This is a schematic diagram illustrating the effect of constructing an environmental safety potential field and spatial skeleton line based on a generalized Venn diagram (GVD) for a multi-task path planning method for a self-balancing bicycle robot according to the present invention.
[0071] Figure 3 This is a comparative experimental diagram of the reversing and path extension method of the multi-task path planning method for a self-balancing bicycle robot according to the present invention.
[0072] Figure 4 This invention relates to a traditional A* path planning graph for a single task point in a multi-task path planning method for a self-balancing bicycle robot.
[0073] Figure 5 This invention relates to an improved hybrid A* path planning graph for a self-balancing bicycle robot multi-task path planning method under a single task point.
[0074] Figure 6 This invention relates to an improved hybrid A* path planning diagram based on a single-task point and a set arrival angle in a multi-task path planning method for a self-balancing bicycle robot.
[0075] Figure 7 This invention relates to an improved hybrid A* path planning graph for a self-balancing bicycle robot under multi-task points.
[0076] Figure 8 This is a diagram illustrating the obstacle avoidance process of a local algorithm for a self-balancing bicycle robot's multi-task path planning method according to the present invention when encountering stationary obstacles.
[0077] Figure 9 This is a diagram illustrating the obstacle avoidance process of a local algorithm for a multi-task path planning method for a self-balancing bicycle robot according to the present invention. Detailed Implementation
[0078] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0079] Reference Figure 1 This invention proposes a multi-task path planning method for a self-balancing bicycle robot. The overall execution flow mainly includes: First, the system performs environmental perception and task initialization, establishing a grid map containing obstacle information and constructing a generalized Vinograph safety potential field to characterize the environmental topological features. Simultaneously, it receives a task sequence containing multiple sequential target points and determines the entry heading and boundary constraints of each intermediate node through multi-task topology deduction. Then, it enters the global path planning stage. Based on the safety potential field and boundary constraints, it performs a bidirectional heuristic search based on hybrid primitives in the three-dimensional state space to generate a global basic path that satisfies nonholonomic kinematic constraints. After geometric continuity processing and nonlinear smoothing optimization, it outputs a curvature-continuous global reference trajectory. Finally, it enters the local dynamic planning and tracking stage. The system constructs a local navigation task based on the global reference trajectory, generates a dynamic window in the velocity-front wheel steering angle space, and performs stability verification and trajectory pruning using the inverted pendulum dynamics model of the self-balancing robot. The optimal control command is selected through an evaluation function to drive the robot's movement until all task target points are completed.
[0080] Step 1: Environmental Modeling and Construction of the Environmental Safety Potential Field Based on the Generalized Venograph. The establishment of the environmental grid model and the construction of the generalized Venograph potential field specifically includes: mapping the environmental data collected by sensors into a two-dimensional binary grid map; using a distance transformation algorithm to calculate the Euclidean distance from free region nodes to the nearest obstacle to generate an Euclidean distance field; identifying the set of local maxima in this distance field to extract the generalized Venograph skeleton reflecting the maximum passage gap in the environment; subsequently, by constructing a nonlinear obstacle repulsion function inversely proportional to the distance and an attraction function pointing towards the skeleton region, the two are weighted and superimposed to generate a composite environmental safety potential field, thereby forming a safe guiding gradient from the high-potential-energy obstacle region to the low-potential-energy skeleton region during path search.
[0081] This step aims to transform the geometry of the physical environment into a mathematical potential field to guide pathfinding. It utilizes generalized Venn diagrams (GVD) to extract the "maximum gap skeleton" within the environment, ensuring the robot travels along the safest topological centerline in complex environments. The system first establishes a two-dimensional grid map. Define the area occupied by static obstacles as a set. For each free space node p(x,y) in the map, the minimum Euclidean distance to the nearest obstacle boundary is calculated using the Euclidean distance transform algorithm (EDT). The calculation formula is as follows:
[0082]
[0083] Distance field distribution based on the whole map The system extracts the environmental skeleton by detecting local extrema of the distance gradient. Generalized Vinograph skeleton. It consists of a set of points satisfying the following geometric characteristics: the point has equal and locally maximum Euclidean distances to at least two discrete obstacles in the environment. Mathematically, the skeleton points lie on the ridges of the distance field, representing the safest path away from obstacles within the current local region. To guide the planner to prioritize areas near the skeleton lines, this invention constructs a composite potential field. The potential field is represented by the extracted skeleton lines. The "potential valley" (region of lowest cost) is defined, with the obstacle boundary as the "potential peak." The potential field function is constructed as a nonlinear decaying form with respect to the obstacle distance:
[0084]
[0085] in, The potential field cutoff threshold (corresponding to the robot's safe expansion radius). The potential field strength gain coefficient is... The decay exponent is denoted by . This potential field, through the inverse mapping of the distance gradient, ensures that the lowest point of the potential field naturally coincides with the skeleton of the Venn diagram, thus implicitly guiding the path towards the center of the spacious region during global search through the cost function.
[0086] Step 2: Multi-task topology deduction and boundary constraint setting. Traverse the sequence of task target points and identify intermediate task nodes that simultaneously serve as the end point of the current segment and the starting point of the next segment. For each intermediate task node, perform a low-dimensional geometric path pre-search in a 2D grid map, pointing from the current node to subsequent adjacent task nodes, generating a collision-free geometric guidance path. Select a path point on the geometric guidance path with a set look-ahead distance from the current node, calculate the topological tangential direction from the current node to this path point, and define it as the optimal entry heading angle for the end point of the current task segment. Bind the optimal entry heading angle to the coordinate position of the intermediate task node, combining them to generate a target state with both position and attitude constraints, forcing the path planning algorithm to keep the vehicle's orientation collinear with the subsequent travel direction when reaching this node. Simultaneously, perform priority determination when generating the target state; if a user-specified forced arrival angle exists, it is prioritized, and the terminal pose state after the previous segment's planning is directly inherited as the starting state of the next segment, ensuring that multiple task segments satisfy geometric position coincidence and tangential direction continuity at the connection points, eliminating in-situ turning actions during task switching.
[0087] In processing cases containing starting points and multiple sequential task objective points In complex task sequences, to ensure smooth pose transitions between task segments and avoid in-situ turning or attitude adjustments for the self-balancing bicycle robot, the system needs to determine the heading angle at each task point. The system assigns each task based on the user-defined task attributes. Perform the following topological deduction logic: First, for the starting point of the sequence... Directly read the robot's current real-time pose This serves as the initial boundary condition for the first stage of the planning. Secondly, for intermediate task points... (in The system determines whether the point has preset constraints: if a fixed angle is set, the user-specified angle is directly applied. Locking the boundary constraints for this task point, i.e. If set to free entry (intelligent entry mode), in order to obtain the optimal posture that conforms to the subsequent path trend, the system performs a low-dimensional path rehearsal based on the traditional A* algorithm. The traditional A* algorithm searches in a two-dimensional plane from the current task point. To the next mission point Shortest geometric path The system is in the pre-simulation path. Select distance Path points with a certain look-ahead distance Construct topological tangent vectors :
[0088]
[0089] The optimal entry heading that aligns with the progress trend of the next task segment can be determined using this vector. :
[0090]
[0091] And lock that angle as the mission point The endpoint constraint and the starting point constraint of the next task segment. Finally, for the last target point in the task sequence. If the user does not specify the final parking posture, the system will release the heading angle constraint for that point. During the global path search process, the algorithm only constrains the coordinates. It must reach the destination, while allowing the robot to cut in at any angle (i.e.) This allows the planner to search for the attitude with the lowest cumulative cost (G value) as the final stopping state, minimizing unnecessary attitude adjustment maneuvers.
[0092] Step 3: Bidirectional Global Path Search Based on Hybrid Primitives. A three-dimensional discrete state space containing x-coordinates, y-coordinates, and heading angles is constructed. A dual hybrid heuristic function is built by combining nonholonomic kinematic distance and obstacle avoidance distance based on breadth-first search. During the search process, a priority queue is established based on the comprehensive cost value, and two modes, discrete expansion and analytical expansion, are executed cyclically. Discrete expansion is based on the minimum turning radius and body geometry constraints of the bicycle robot, generating a set of child nodes that satisfy the nonholonomic constraints along different turning angles in both forward and backward modes. Analytical expansion adopts a shooting mechanism with adaptive frequency adjustment, periodically attempting to construct a collision-free Reeds-Shepp curve that directly connects the current node and the target state node. At the same time, when calculating the cumulative cost of the node, the environmental risk cost generated by the generalized Vinograph potential field distribution is introduced, and the upper bound of the global search cost is updated using an optimality preservation strategy, thereby ensuring the geometric feasibility of the path while achieving safe convergence to the environmental skeleton line. Based on the environmental safety potential field generated in step one and the start and end boundary constraints of each subtask determined in step two, a heuristic search is performed in the three-dimensional configuration space (including the horizontal coordinate, vertical coordinate and heading angle).
[0093] To visually demonstrate the improvements and specific implementation details of this invention compared to traditional methods, please refer to the comparison. Figure 3 and Figure 4 . Figure 3 This demonstrates the path generated using the traditional A* algorithm at a single task point. Because the traditional algorithm only considers the geometric connectivity of the mesh and treats the robot as a point mass, the generated path appears as a rigid trajectory composed of polyline segments, containing many sharp turns that a self-balancing bicycle robot cannot perform.
[0094] In contrast, this invention generates paths by introducing nonholonomic kinematic constraints, such as... Figure 4 As shown. In Figures 4 to 6 In the simulation diagram, blue triangles represent the task starting point, and green circles represent the task target point. The path trajectory uses color to distinguish motion modes: blue lines represent the robot's forward movement path, red lines represent the robot's backward movement path, and yellow lines represent the changeover buffer path generated during the transition between forward and backward movement. Simultaneously, the red-blue search tree in the diagram represents the Reeds-Shepp curve exploration process when generating the global path; blue represents exploration in the forward direction, and red represents exploration in the backward direction. Figure 4 As can be seen, the path planned by this invention presents a smooth, continuous curvature trajectory that conforms to the natural motion characteristics of a bicycle self-balancing robot, effectively eliminating the broken line characteristics in traditional methods.
[0095] The specific search and generation process is as follows:
[0096] First, define the robot's motion primitives. The set of actions for node expansion is defined as a combination of different gear linear velocities and different steering angles. For any parent node in the search tree, the state of the child node is calculated by applying a selected control variable and integrating the vehicle's kinematic equations. The state update formula for the child node is as follows:
[0097]
[0098] In the above formula, Represents the coordinates and heading of the parent node. This represents the calculated state of the child nodes; This represents the robot's linear velocity, and its values include both forward and backward speeds. Represents the steering angle of the front wheels; This refers to the wheelbase between the front and rear wheels of the robot. The integral time step is defined as follows. Secondly, a dual heuristic evaluation function is constructed to guide the search direction. The evaluation function consists of the cumulative cost. and heuristic costs It consists of two parts.
[0099] (1) Cumulative cost To ensure path optimality, the actual cost function incorporates path length, reversal penalty, and environmental potential cost from step one. Its mathematical formula is as follows:
[0100]
[0101] In the formula, The cumulative cost of the parent node; The Euclidean distance for the current expansion step; This is a reversal penalty weight, used to suppress frequent reciprocating maneuvers; This is the potential field weighting coefficient, used to introduce soft environmental constraints.
[0102] (2) Heuristic Cost To accurately guide the search, a maximum value combination strategy is used to calculate the heuristic cost.
[0103]
[0104] In the formula, Indicates based on Figure 3 The integrity distance obtained from the traditional grid map search shown is mainly used to guide vehicles around dead ends; This represents the nonholonomic kinematic distance based on the Reeds-Shepp curve, used to precisely guide the vehicle into the target attitude.
[0105] Finally, a resolving expansion strategy based on Reeds-Shepp curves is executed. During node expansion, when a node enters the resolving neighborhood of the target point, an attempt is made to directly connect the current node and the target state using a collision-free Reeds-Shepp curve. This mechanism is crucial for satisfying specific pose constraints. Figure 5 As shown, when the user sets a specific arrival angle constraint, the algorithm can use analytical extension to precisely adjust the end-effector trajectory, enabling the robot to... Figure 5 The specific tangential angle reached at the target point (green circle) is indicated by the connection path of the red and blue line segments, which shows the adjustment maneuver automatically generated by the robot to meet the angular constraint.
[0106] Using the search mechanism described above, for a task sequence containing multiple target points, the algorithm sequentially searches each adjacent task segment. For example... Figure 6 As shown, in a multi-task scenario, the algorithm can generate a continuous, smooth global reference path that passes through all the green circle task points in sequence. The task segments are seamlessly connected by reasonable forward and backward segments, enabling the bicycle self-balancing robot to pass through each task segment smoothly.
[0107] Step 4: Geometric Continuity and Nonlinear Optimization of the Global Path. First, identify the turning cusps in the global basic path where the direction of travel changes. Using these cusps as dividing points, decompose the path into several unidirectional motion segments. Perform high-resolution linear interpolation resampling on each segment to increase the optimization degrees of freedom. For each turning cusp, perform geometric space compensation based on the robot's front and rear wheel axle distance and overall length to construct a straight buffer path to eliminate the risk of collisions during state transitions caused by the rear of the robot lagging behind the steering center. Then, construct a nonlinear comprehensive objective function that includes smoothness cost, path length cost, and obstacle repulsion cost based on the environmental potential field. Calculate the negative gradient direction of the objective function relative to the path point coordinates using a restricted gradient descent algorithm. During the iterative adjustment of the path point positions, employ a combination of soft and hard safety constraints: soft constraints using the potential field guide the path away from obstacles, while hard constraints are implemented through forward collision detection to prevent the smoothing algorithm from disrupting the collision-free characteristics of the path. Finally, generate a geometrically smooth and curvature-continuous global reference trajectory.
[0108] In response to the problem that the global basic path generated in step three is composed of discrete motion primitives and has geometric discontinuities at the reversal points, this step performs reversal space compensation and nonlinear iterative smoothing based on vehicle body geometry to generate a reference trajectory with continuous curvature and conforming to dynamic characteristics.
[0109] First, a reversal buffer based on the vehicle body geometry is constructed. The self-balancing bicycle robot is a typical nonholonomic constraint system, which, due to its long wheelbase structure, cannot align in place like a zero-radius steering chassis.
[0110] Please see Figure 7 This diagram contains two comparative illustrations, left and right. The dashed path represents the globally planned path, the blue path is the forward path, the red path is the backward path, the yellow path is the path generated by the reversal buffer, and the solid path represents the local following path of the robot's actual movement. For example... Figure 7 As shown, if no reversing buffer path is added, when the robot reaches the reversing apex of the global path, although the front of the vehicle has reached the theoretical turning point, the main body of the vehicle and the rear wheels are still in an unadjusted state. This causes the robot to be unable to overcome physical constraints to follow the target path when it tries to perform subsequent reversing or turning actions (manifested as a serious deviation or inability to connect the solid line trajectory and the dashed line trajectory).
[0111] To address the aforementioned issues, this invention performs geometric compensation on each reversing cusp in the global basic path: the system traverses the path nodes and identifies the cusp positions where the direction of motion changes. Using this point as a reference, and combining the robot's body length and minimum turning radius, an additional "buffer path" is constructed in front of the reversing point along the current tangential direction. This buffer path simultaneously represents both forward and backward paths. This "V"-shaped or "I"-shaped buffer path design allows the robot to fully adjust its body posture to be parallel to the tangential direction of the next path segment before entering reverse motion, thereby ensuring that the local follower controller can smoothly transition from forward mode to backward mode.
[0112] Secondly, a nonlinear smoothing optimization based on constrained gradient descent is performed. To eliminate the jagged paths caused by discrete grid search and further move away from obstacles to achieve a smooth trajectory, the system constructs a comprehensive nonlinear energy function J that includes smoothness cost, obstacle repulsion cost, and path length cost.
[0113]
[0114] In the formula, the first term uses the second-order difference to constrain the smoothness of the path, forcing path points to tend towards a collinear distribution to reduce curvature; the second term... The obstacle repulsion function is based on the generalized Vinograph potential field in step one. Its specific form is a nonlinear power function of the potential field value, which is used to mathematically generate the gradient force that pushes the path away from the obstacle; the third term is used to constrain the total length of the path. These are the weighting coefficients for each item.
[0115] The system uses the gradient descent algorithm to iteratively fine-tune the coordinates of path points. In each iteration, the path point updates follow the negative gradient direction:
[0116]
[0117] in For learning rate, The gradient of the energy function.
[0118] To ensure the safety of the optimization process, this invention employs a dual constraint mechanism combining hardware and software.
[0119] "Soft constraints" are manifested as the obstacle repulsion term in the energy function, which uses the gradient force generated by the environmental potential field to continuously guide the path points to move towards the free space skeleton line away from the obstacle.
[0120] The "hard constraint" is manifested in a forward-looking collision locking mechanism. Before each iteration of coordinate updates, the system performs an expansion collision detection. If the new coordinates of a path point after moving along the gradient direction fall into the expansion region of an obstacle, the update is deemed invalid, and the coordinates of that point are forcibly locked unchanged. This mechanism effectively prevents the phenomenon of a path penetrating obstacles due to an excessive pursuit of smoothness, and ultimately outputs a global reference trajectory that satisfies both geometric continuity and physical safety.
[0121] Step 5: Local Dynamic Programming with Dynamic Stability Verification. During the robot's tracking of the global reference trajectory, a dynamic window sampling space containing linear velocity and front wheel angle is first constructed. For the asymmetric motion characteristics of the self-balancing bicycle robot, an asymmetric kinematic constraint window containing standard parameters for the forward mode and high-damping parameters for the reverse mode is established. Subsequently, the inverted pendulum dynamic model of the self-balancing bicycle robot is introduced as a stability filter, and the dynamic roll angle and roll angle change rate required to maintain the balance of each sampling command are analytically calculated. A trajectory pruning strategy based on the dynamic manifold is executed, and sampling commands that cause the predicted state variables to exceed the robot's physical equilibrium limits and the momentum wheel torque response bandwidth are judged as unstable singular solutions and discarded. Finally, within the effective solution space that ensures dynamic stability, the optimal control command is selected based on a multivariate evaluation function, and combined with a topological horizon truncation mechanism and dual state switching logic, the robot is driven to achieve robust tracking of globally discontinuous path segments.
[0122] During the robot's tracking of the global reference trajectory, in order to cope with dynamic changes in the environment and maintain the physical stability of the self-balancing system, this step adopts a trajectory pruning and hierarchical control strategy based on the inverted pendulum dynamics manifold. This invention abandons the traditional planning paradigm of differential mobile robots that is based solely on planar kinematics, and constructs a system based on linear velocity v and front wheel rotation angle... A local planner that uses the inverted pendulum dynamics constraint as the core control variable.
[0123] First, to address the discontinuity of the global reference trajectory generated in step four at the turning cusp, the system introduces a topology index locking mechanism. The current robot pose is defined as... The cusp pose is as follows: The local planner's reference target search window The constraint is enforced to include only pathpoints from the current index to the cusp index. This constraint masks gravitational field disturbances in the subsequent reverse path segments of the cusp, forcing the robot state to monotonically converge toward the cusp position in phase space. The robot then meets the high-precision arrival criterion. Or, when the system is in a stagnant state of low-speed equilibrium for a long time in the neighborhood of the cusp (i.e., the speed v is less than the static threshold and the duration exceeds the set time limit), the logic flip of the state machine is triggered, the index lock is released and the system moves to the next reverse path, ensuring that the nonholonomic constraint system completes a smooth mode switch in the zero-speed state.
[0124] Secondly, considering the difference in steady-state characteristics of the self-balancing bicycle robot in forward and backward modes, an asymmetric dynamic sampling space is constructed. Within the control period k, based on the current state... Generate the instruction search space for the next time step. This space is defined by a dynamic window that is limited by the acceleration and deceleration performance of the motor. Mechanical limit constraints Together with dynamic model constraints, it constitutes the system. Specifically, in the reversing mode, the system automatically loads a high-damping kinematic parameter set, adjusting the linear velocity amplitude v and the rate of change of the front wheel steering angle. Implement nonlinear suppression function This is to compensate for the negative stability gain of the rear-wheel steering system during low-speed reverse movement. The specific constraint is expressed as follows:
[0125]
[0126] in, This is the reversing speed attenuation coefficient. This represents the maximum allowable steering increment in reverse mode.
[0127] Next, perform a dynamic stability check on the inverted pendulum, i.e., dynamic manifold pruning. For the sampling space... For each set of candidate instructions, the system analyzes the theoretical steady-state tilt angle required to maintain balance, based on the inverted pendulum model of the self-balancing bicycle robot and the centripetal force principle of circular motion. The calculation formula is as follows:
[0128]
[0129] Where g is the acceleration due to gravity, and L is the wheelbase between the front and rear wheels. Furthermore, the rate of change of roll angle is calculated using the finite difference method. :
[0130]
[0131] The system sets physical constraint boundaries, including the maximum safe roll angle determined by the vehicle body geometry envelope. and the maximum roll rate determined by the torque response bandwidth of the momentum wheel. If the absolute value of the theoretical roll angle calculated by a certain set of instructions is greater than... or its rate of change is greater than If the instruction falls within the unstable singular region of the system, it is determined that the instruction is directly removed from the feasible solution space. This step ensures that none of the output instructions will physically cause the robot to tip over.
[0132] Finally, in the effective solution space after stability pruning Internally, a normalized multivariate nonlinear evaluation function is constructed. The optimal control command is selected based on this. This function is composed of a weighted average of azimuth angle evaluation terms, obstacle distance evaluation terms, and velocity evaluation terms, and its mathematical expression is as follows:
[0133]
[0134] in, These are the weighting coefficients for each evaluation item. Azimuth evaluation item. Used to evaluate the deviation between the predicted trajectory's end orientation and the local target point, guiding the robot to conform to the reference path; velocity evaluation item. Under the premise of ensuring safety and stability, robots are encouraged to travel at speeds closer to the desired values.
[0135] For obstacle distance evaluation item This invention employs a rational dual-mode decision-making mechanism to cope with different types of obstacles. Please refer to [link / reference]. Figure 8 For stationary obstacles (gray squares in the image), when the distance to the detected obstacle is... Less than the warning threshold At that time, the system uses a Gaussian function to nonlinearly amplify the repulsive weights of the distance evaluation term. For example... Figure 8 As shown, the bicycle robot adjusts the front wheel angle when approaching an obstacle. The goal is to plan a smooth, contour-to-obstacle trajectory that follows the boundaries of obstacles while maintaining a safe clearance, rather than resorting to abrupt braking. (Refer to...) Figure 9 For moving obstacles (yellow squares in the image), the system incorporates time-dimensional state prediction. It calculates the minimum spatiotemporal distance between the predicted trajectory and the area the obstacle will eventually occupy. .like Figure 9 As shown, even when an obstacle is approaching from the front, the robot can plan a strategy based on the prediction results to either pass behind its movement trend or slow down in advance to avoid it, thus achieving proactive safety game theory. The system ultimately selects the set of instructions that maximizes the evaluation function J value. The robot's hub motors and steering servos are driven by the underlying controller to execute the task sequence until all tasks are completed.
[0136] This invention provides a systematic improvement to address the nonholonomic constraints and underactuated characteristics of self-balancing bicycle robots. It overcomes the shortcomings of traditional mobile robot planning frameworks that focus only on planar geometry and collision-free operation while neglecting the three-dimensional dynamic balance of the robot body. By constructing a hierarchical architecture of "global topology guidance + local dynamics verification," the invention deeply couples the environmental safety potential field, multi-task topology logic, and the underlying inverted pendulum dynamics model. This effectively solves the problems of path discontinuity and high-speed dynamic instability caused by kinematic constraints in confined spaces, ensuring operational efficiency and inherent safety in complex unstructured environments.
[0137] This invention improves the efficiency and optimality of the global path search algorithm (hybrid A*). It refines the node expansion and convergence mechanisms of the traditional hybrid A* algorithm. By introducing a dual-modal node expansion strategy, it executes both kinematic-based discrete expansion and Reeds-Shepp curve-based analytical expansion in parallel, balancing search completeness and convergence speed. It innovatively designs an adaptive firing frequency and optimality preservation mechanism, dynamically adjusting the attempt frequency of analytical expansion based on target distance, and continuing to search for potential better solutions after finding a feasible solution instead of immediately terminating, thus approximating the globally optimal path while maintaining computational efficiency. Furthermore, by combining generalized Vinograph potential field guidance and multi-task topology derivation, the generated global path is not only geometrically smooth and continuous but also topologically compatible with task flow requirements, avoiding discontinuous actions at task switching points.
[0138] This invention addresses the dynamic adaptation and stability improvement of local dynamic programming. It overcomes the limitation of traditional dynamic window algorithms, which are only applicable to differential chassis, by establishing an asymmetric kinematic constraint window and an inverted pendulum dynamic filter tailored to self-balancing characteristics. In the velocity sampling space, the algorithm can infer the predicted roll angle and momentum wheel torque requirements corresponding to commands in real time, directly eliminating unstable solutions that may lead to rollover or actuator saturation. Simultaneously, considering the negative stability of the bicycle model when reversing, it automatically switches to a highly constrained reversing parameter set, implementing nonlinear suppression of reversing linear velocity and angular acceleration, effectively ensuring chassis stability during precise operations such as reversing into a parking space.
[0139] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and these variations still fall within the protection scope of the present invention.
Claims
1. A multi-task path planning method for a self-balancing bicycle robot, characterized in that: Includes the following steps: Step 1: Environmental Modeling and Safety Potential Field Construction: Establish an environmental grid model containing static obstacle distribution information, construct a generalized Venn diagram based on the grid model, and extract free space skeleton lines; calculate the Euclidean distance from each node to the nearest obstacle, and fuse the nonlinear repulsive force function of the obstacle with the skeleton guiding gravity function to generate the environmental safety potential field distribution; Step 2: Multi-task topology deduction and boundary constraint setting: Receive a task sequence containing the initial pose and multiple sequential task target points, and identify intermediate task nodes; analyze the geometric positions and topological connection trends of adjacent task target points, and deduce the optimal entry heading angle of the intermediate target point; bind the optimal entry heading angle to the target point coordinates to form a position-attitude dual boundary constraint; execute priority determination and state inheritance strategies to determine the start and end boundary conditions of each sub-task path planning. Step 3: Bidirectional Global Path Search Based on Hybrid Primitives: Construct a three-dimensional discrete state space containing x-coordinate, y-coordinate, and heading angle. Based on the environmental safety potential field and boundary constraints, perform node search using an improved hybrid A* algorithm. During the search process, perform discrete extension based on kinematic model and analytical extension based on Reeds-Shepp curve in parallel. Combine adaptive firing frequency and optimality preservation mechanism to generate a global basic path that satisfies the minimum turning radius constraint and is collision-free. Step 4: Geometric continuity and nonlinear optimization of the global path: Identify commutation cusps in the global basic path and construct commutation buffers based on vehicle body geometry; The path is decomposed and resampled using the cusp of the reversal as the dividing point, and a nonlinear objective function containing smoothness cost, path length cost, and obstacle repulsion cost is constructed. A dual safety constraint combining soft and hard is adopted, and the path point coordinates are iteratively optimized through the gradient descent algorithm to generate a global reference trajectory with continuous curvature. Step 5: Local dynamic programming with dynamic stability verification: During the robot's tracking of the global reference trajectory, a dynamic window sampling space containing linear velocity and front wheel rotation angle is constructed; the inverted pendulum dynamic model of the self-balancing bicycle robot is introduced to calculate the predicted roll angle and roll angle change rate corresponding to each sampling command, and sampling commands that exceed the physical equilibrium limit and momentum wheel torque limit are eliminated; combined with the asymmetric kinematic constraint window and topological horizon truncation mechanism, the optimal control command is selected to drive the robot's motion.
2. The multi-task path planning method for a self-balancing bicycle robot according to claim 1, characterized in that: The specific process of establishing the environmental grid model in step one is as follows: receiving raw environmental data collected by sensors and mapping it into a two-dimensional grid matrix to generate a binary map; for the free passage area of the binary map, using a distance transformation algorithm to calculate the minimum Euclidean distance from each free node to the nearest obstacle node to generate an Euclidean distance field; identifying the set of local maxima in the Euclidean distance field, extracting the free space topological central axis, and generating a generalized Vinograph skeleton.
3. A multi-task path planning method for a self-balancing bicycle robot according to claim 1 or 2, characterized in that: The specific steps in step one for generating the environmental safety potential field distribution include: constructing a nonlinear repulsion function that maps Euclidean distance to obstacle repulsion cost, with higher costs for closer objects and infinite costs for objects less than a safety threshold, forming a virtual wall; constructing a skeleton-guided gravity function that assigns the lowest potential energy cost to the generalized Vinograph skeleton region, forming a potential energy valley; and weighted superposition of obstacle repulsion cost and skeleton-guided gravity function to generate the environmental safety potential field.
4. The multi-task path planning method for a self-balancing bicycle robot according to claim 1, characterized in that: The specific process of multi-task topology deduction and boundary constraint setting in step two is as follows: traverse the sequence of task target points and identify intermediate task nodes that are simultaneously the end point of the current road segment and the starting point of the next road segment; for each intermediate task node, perform a low-dimensional geometric path pre-search from the current node to the subsequent adjacent task node in the two-dimensional grid map to generate a collision-free geometric guidance path. Select a path point on the geometric guidance path that is a set look-ahead distance from the current node, calculate the topological tangential direction from the current node to the path point, and define it as the optimal cutting heading angle at the end of the current task segment; bind the optimal cutting heading angle to the coordinates of intermediate task nodes to generate a target state with position-attitude dual constraints.
5. The multi-task path planning method for a self-balancing bicycle robot according to claim 4, characterized in that: When generating the target state, a priority determination and state inheritance strategy needs to be executed. The priority determination and state inheritance strategy includes: the system checks whether there is a user-manually specified forced arrival angle in the task sequence. If so, the user instruction is used as the highest priority boundary constraint. When executing multi-segment continuous task planning, the terminal pose state of the previous segment is directly used as the starting state of the next segment to ensure that the geometric positions of adjacent task segments coincide and the tangential direction is continuous.
6. The multi-task path planning method for a self-balancing bicycle robot according to claim 1, characterized in that: The specific process of improving the hybrid A* algorithm in step three is as follows: Initialize a priority queue sorted by comprehensive cost value and add the starting state node to the queue; take out the current node with the lowest cost value from the queue and perform discrete expansion and analytical expansion in parallel; the discrete expansion is based on the minimum turning radius of the bicycle robot and the geometric constraints of the vehicle body, and generates child nodes that satisfy nonholonomic constraints in forward and backward modes along the maximum left turn, straight line, and maximum right turn directions; the analytical expansion periodically attempts to construct a collision-free Reeds-Shepp curve connecting the current node and the target state node.
7. The multi-task path planning method for a self-balancing bicycle robot according to claim 6, characterized in that: The adaptive frequency adjustment and optimality preservation mechanism of the analytical expansion includes: calculating the Euclidean distance between the current node and the target point in real time; increasing the analytical expansion frequency when the distance is less than a preset near-field threshold and decreasing the frequency when the distance is greater than the threshold; after generating a feasible Reeds-Shepp path through analytical expansion, calculating the total cost of the path and recording it as the current optimal solution, and updating the upper bound of the global search cost; continuing to expand nodes whose estimated cost is lower than the upper bound until the queue is empty or the theoretical minimum cost of the remaining nodes exceeds the current optimal solution, at which point the search is terminated.
8. A multi-task path planning method for a self-balancing bicycle robot according to claim 6, characterized in that: The comprehensive cost of the priority queue includes environmental safety potential field cost and dual hybrid heuristic cost: when calculating the cumulative cost of a node, the cost of the generalized Vinograph potential field is introduced as the environmental risk cost and added to the path length cost; when calculating the estimated cost of a node, the Reeds-Shepp incomplete kinematic distance and the obstacle avoidance distance based on BFS are calculated simultaneously, and the maximum value of the two is taken as the heuristic cost.
9. The multi-task path planning method for a self-balancing bicycle robot according to claim 1, characterized in that: The specific process of global path geometric continuity processing and nonlinear optimization in step four is as follows: using the commutation cusp as the dividing point, the global path is decomposed into unidirectional motion segments and resampled at high resolution; a nonlinear objective function containing smoothness cost, obstacle repulsion cost and path length cost is constructed; the path point coordinates are iteratively adjusted using the constrained gradient descent algorithm to generate a curvature-continuous global reference trajectory.
10. A multi-task path planning method for a self-balancing bicycle robot according to claim 9, characterized in that: The combined soft and hard safety constraints of the restricted gradient descent include: soft constraints achieved through the obstacle repulsion cost in the objective function, guiding path points away from obstacles; and hard constraints achieved by performing forward collision detection before each iteration and locking the coordinates if the path point falls into the obstacle expansion region after moving.
11. A multi-task path planning method for a self-balancing bicycle robot according to claim 9, characterized in that: The process of constructing the reversing buffer zone is as follows: for each reversing apex, a straight buffer path is extended along the tangent direction before reversing; the length of the buffer path is set according to the wheelbase of the robot's front and rear wheels and the total length of the robot body to ensure that the entire robot body enters the safe area when reversing.
12. The multi-task path planning method for a self-balancing bicycle robot according to claim 1, characterized in that: In step five, the dynamic stability verification adopts a trajectory pruning strategy based on the inverted pendulum dynamic manifold: after generating the control command set by sampling in the velocity space, the predicted roll angle and roll angle change rate corresponding to each command are calculated using the inverted pendulum dynamic equation; physical constraint boundaries of the maximum safe roll angle and the momentum wheel torque response bandwidth are constructed, and instability commands that exceed the constraints are eliminated.