Safe Trajectory Planning for Incremental Robots Based on a Spatiotemporal Variable-Step-Size A* Algorithm

In this paper, a planning method based on the spatiotemporal variable-step-size A* algorithm is proposed to address the problem of safe trajectory planning for incremental, wheeled, mobile robots in complex motion scenarios with multiple robots. After constructing the known conditions, the spatiotemporal variable-step-size A* algorithm is first used to perform a collision-avoiding initial spatiotemporal trajectory search, and a variable time step is utilized to ensure that the robot completes the search at the target speed. Subsequently, the trajectory is instantiated using B-spline curves in a numerical optimization considering constraints to generate the final smooth trajectory. The results of simulation tests in a field-shaped, complex, dynamic scenario show that the proposed trajectory planning method is more applicable, and the results indicate higher efficiency compared to the traditional method in the incremental robot trajectory planning problem.


Introduction
In the field of robot trajectory planning, there is an unsolved problem: safe and efficient trajectory planning when introducing a new robot into a complex motion scenario without affecting the existing moving robots.The purpose of this paper is to explore how to address this specific and unresolved challenge.
The challenge of this problem is introducing a new robot into a complex motion scenario.This necessitates the consideration of various factors, including the interaction effects between the incremental robot and the existing robots, the representation of the motion states of the different robots, as well as the realization of safe trajectory planning under complex spatiotemporal constraints [1].Solving this problem is crucial for the operation of multi-agent robotic systems, particularly in robotic network applications.
From the perspective of spatiotemporal constraints, especially when temporal information is considered, unlike trajectory planning, path planning usually focuses only on spatial information, and it is difficult to fully consider the temporal information of robot motion [2].This leads to path planning methods not adapting to changes in the time dimension and difficulty in avoiding collisions in dynamic motion scenarios, especially when incremental robots are introduced [3,4].This highlights the challenges of complex spatiotemporal constraints and introducing new robots in dynamic scenarios.The criticality of temporal information constraints further underscores the necessity for in-depth research and innovative solutions to this problem.

Existing Methods
Several studies have used decoupled spatiotemporal planning to accomplish trajectory planning [5].Decoupled spatiotemporal planning usually separates spatiotemporal information, considering spatial information first and then addressing temporal information [6].Commonly used spatiotemporal decoupling planning methods include the search

Section Summaries
The remainder of the paper is organized as follows.Section 2 introduces the trajectory planning method, including the method flow; the construction of known conditions, i.e., the establishment of spatiotemporal grid maps; and the computation of the variable time step.
Section 3 introduces the method of calculating the initial spatiotemporal trajectory using the spatiotemporal A* algorithm with a variable time step, including its searching process and node expansion method and the numerical design of the algorithm.
Section 4 introduces the method of instantiating the initial spatiotemporal trajectory, including the B-spline curve fitting method and the numerical optimization method of control points based on constraints.
Section 5 discusses the simulation analysis conducted using the proposed method, presents a comparison with the existing planning methods, and explores the proposed method's applicability to the incremental robot trajectory planning problem.
Finally, the conclusion and future work are discussed in Section 6.

Overview
This paper will explore an innovative incremental robot trajectory planning method for solving the problem described in the introduction.The STP-STVS-A* involves a spatiotemporal variable-step-size A* algorithm based on a variable time step, which optimizes the spatiotemporal constraints of incremental and existing robots with comprehensive consideration and achieves safe trajectory planning for incremental robots without affecting existing robots.

Method Flow
The overall flow of the STP-STVS-A* is shown in Figure 1.
lation for node feasibility determination is set to ensure non-collision with the trajectory of the subsequent optimization of the space to obtain the initial spatiotemporal trajectory.
In the third step, trajectory instantiation is carried out; the initial spatiotemporal trajectory point is taken as the initial control point of the B-spline curve using B-spline curve fitting; and numerical optimization considering constraints is carried out for the control point to realize the trajectory instantiation and generate the final smooth trajectory.

Spatiotemporal Grid Map Construction
When constructing known conditions, the first step is to construct the spatiotemporal grid map.The traditional two-dimensional XY grid map can only represent spatial information and cannot directly cover the time dimension, so it is necessary to reconstruct the map by adding the time T-dimension information as the third dimension to construct the X-Y-T three-dimensional spatiotemporal grid map [24].
Given that the robots in the scenario are not driven by human beings, there is no need to consider semantic information.Considering the complexity of the situation, in accordance with the research by Li, B. [25], the Cartesian coordinate system is employed to maintain consistency in scenario description, thereby ensuring completeness of expression and method applicability.
The X-Y-T spatiotemporal grid map is shown in Figure 2. To ensure that multiple robots do not collide, the obstacle information needs to be represented in a 3D spatiotemporal grid map, where the spatiotemporal trajectory of the existing robots is represented as dynamic obstacles visually identifiable in the grid map as regions of XY positional states at various discrete time points [9].The spatiotemporal trajectory of the existing robots is constructed as described in Section 2.4.Dynamic obstacles, depicted in yellow in the figure, are known and predictable, while static obstacles, shown in gray, are represented as XY regions parallel along the time axis T. Using 3D spatiotemporal grid maps to represent obstacles can clearly represent the positional relationship and relative motion of different robots and obstacles during the time period.In the first step, the known conditions are constructed, the environment information and the existing robot information are input, the spatiotemporal grid map is constructed, and its variable time step is calculated according to the incremental robot information.
In the second step, the initial spatiotemporal trajectory is calculated, the incremental robot information is input, the incremental robot time step and spatiotemporal grid map are created, and the search process is conducted using the spatiotemporal A* algorithm with a variable time step.The search process is based on a variable time step to ensure that the incremental robot completes the search at the target speed.The constraint regulation for node feasibility determination is set to ensure non-collision with the trajectory of the subsequent optimization of the space to obtain the initial spatiotemporal trajectory.
In the third step, trajectory instantiation is carried out; the initial spatiotemporal trajectory point is taken as the initial control point of the B-spline curve using B-spline curve fitting; and numerical optimization considering constraints is carried out for the control point to realize the trajectory instantiation and generate the final smooth trajectory.

Spatiotemporal Grid Map Construction
When constructing known conditions, the first step is to construct the spatiotemporal grid map.The traditional two-dimensional XY grid map can only represent spatial information and cannot directly cover the time dimension, so it is necessary to reconstruct the map by adding the time T-dimension information as the third dimension to construct the X-Y-T three-dimensional spatiotemporal grid map [24].
Given that the robots in the scenario are not driven by human beings, there is no need to consider semantic information.Considering the complexity of the situation, in accordance with the research by Li, B. [25], the Cartesian coordinate system is employed to maintain consistency in scenario description, thereby ensuring completeness of expression and method applicability.
The X-Y-T spatiotemporal grid map is shown in Figure 2. To ensure that multiple robots do not collide, the obstacle information needs to be represented in a 3D spatiotemporal grid map, where the spatiotemporal trajectory of the existing robots is represented as dynamic obstacles visually identifiable in the grid map as regions of XY positional states at various discrete time points [9].The spatiotemporal trajectory of the existing robots is constructed as described in Section 2.4.Dynamic obstacles, depicted in yellow in the figure, are known and predictable, while static obstacles, shown in gray, are represented as XY regions parallel along the time axis T. Using 3D spatiotemporal grid maps to represent obstacles can clearly represent the positional relationship and relative motion of different robots and obstacles during the time period.

Variable Time Step Representation
The next step in constructing the known conditions requires the calculation of the variable time step of the robots.The traditional algorithm's time node expansion method is based on an immutable time step for expansion, and it is difficult to express different speed states for the immutable time step, which cannot easily be applied to scenarios involving multiple robots running at different speeds [26].
The variable time step method proposed in this paper determines the sampling time step based on the target speed of the robot, and the nodes are expanded for each robot based on the corresponding time step, which is used to express the scene of different target speeds of intelligent running.The variable time step lengths of different robots are shown in Figure 3. where  is the speed of the robot within the time step  ,  is the speed of robot b within the time step  , and  is the spatial grid step.

Variable Time Step Representation
The next step in constructing the known conditions requires the calculation of the variable time step of the robots.The traditional algorithm's time node expansion method is based on an immutable time step for expansion, and it is difficult to express different speed states for the immutable time step, which cannot easily be applied to scenarios involving multiple robots running at different speeds [26].
The variable time step method proposed in this paper determines the sampling time step based on the target speed of the robot, and the nodes are expanded for each robot based on the corresponding time step, which is used to express the scene of different target speeds of intelligent running.The variable time step lengths of different robots are shown in Figure 3.

Variable Time Step Representation
The next step in constructing the known conditions requires the calculation of the variable time step of the robots.The traditional algorithm's time node expansion method is based on an immutable time step for expansion, and it is difficult to express different speed states for the immutable time step, which cannot easily be applied to scenarios involving multiple robots running at different speeds [26].
The variable time step method proposed in this paper determines the sampling time step based on the target speed of the robot, and the nodes are expanded for each robot based on the corresponding time step, which is used to express the scene of different target speeds of intelligent running.The variable time step lengths of different robots are shown in Figure 3. where  is the speed of the robot within the time step  ,  is the speed of robot b within the time step  , and  is the spatial grid step.The speed of robots can be expressed as follows: where v a is the speed of the robot within the time step t a , v b is the speed of robot b within the time step t b , and d xy is the spatial grid step.
Since the spatial grid step is the same, i.e., the spatial position change is the same, the velocity ratio of the robot can be expressed as follows: Accordingly, the time steps of the robots can be calculated from the target speed and the spatial grid step as follows: The velocity maintenance of the same robot also requires the use of a variable time step.The node expansion process with a 45 • diagonal expansion in the spatial grid will lead to an inconsistent spatial step.To maintain the same speed, diagonal expansion of the time step can be carried out via horizontal and vertical expansion √ 2 times.The same robot's variable time step process is shown in Figure 4.
Sensors 2024, 24, x FOR PEER REVIEW 6 of 29 Since the spatial grid step is the same, i.e., the spatial position change is the same, the velocity ratio of the robot can be expressed as follows: Accordingly, the time steps of the robots can be calculated from the target speed and the spatial grid step as follows: The velocity maintenance of the same robot also requires the use of a variable time step.The node expansion process with a 45° diagonal expansion in the spatial grid will lead to an inconsistent spatial step.To maintain the same speed, diagonal expansion of the time step can be carried out via horizontal and vertical expansion √2 times.The same robot's variable time step process is shown in Figure 4. where  is the speed of the same robot when traveling horizontally and vertically in space,  is the speed when traveling diagonally in space,  is the time when the same robot travels horizontally and vertically in space, and  is the time when the same robot travels diagonally in space.Therefore, the time step of oblique expansion for the same robot while keeping the same target speed can be expressed as follows: Using the node expansion method with a variable time step can ensure that different robots carry out the search process of the initial spatiotemporal trajectory with the determined target speed and maximize the speed of the final trajectory to be stabilized at the target speed.

Known Condition Construction
An incremental robot is defined as a robot that enters the motion scene whose starting point, end point, and target speed are given in the problem, and its spatiotemporal trajectory needs to be solved to safely move from the starting point to the end point.An existing The speed of robots can be expressed as follows: where v i1 is the speed of the same robot when traveling horizontally and vertically in space, v i2 is the speed when traveling diagonally in space, t 1 is the time when the same robot travels horizontally and vertically in space, and t 2 is the time when the same robot travels diagonally in space.Therefore, the time step of oblique expansion for the same robot while keeping the same target speed can be expressed as follows: Using the node expansion method with a variable time step can ensure that different robots carry out the search process of the initial spatiotemporal trajectory with the determined target speed and maximize the speed of the final trajectory to be stabilized at the target speed.

Known Condition Construction
An incremental robot is defined as a robot that enters the motion scene whose starting point, end point, and target speed are given in the problem, and its spatiotemporal trajectory needs to be solved to safely move from the starting point to the end point.An existing robot is defined as a robot that has been moving in the scene; that is, its starting point, end point, target speed, and spatiotemporal trajectory are all known.The starting point, end point, and target speed are set conditions.The spatiotemporal trajectory of the existing robots is necessary for solving this problem as it is a given condition of the incremental robot trajectory calculation.
The spatiotemporal trajectory of existing robots is obtained by taking each existing robot as an incremental robot entering the scene at its previous starting point and conducting trajectory calculation through the method proposed in this paper.When the first robot enters the scene, there is no existing robot.Most existing robots enter the scene at different times, so there is a natural iterability between different existing robots.If existing robots enter the scene at the same time, the priority is randomly assigned for trajectory calculation.It is feasible to calculate the trajectory of existing robots iteratively by using this method as a known condition.The spatiotemporal trajectory of all existing robots is obtained by iterating the trajectory of different existing robots, and the trajectory calculation of the incremental robot entering the scene in the problem is carried out and is considered known information.
According to the above calculations, the map information, the existing robot information, the incremental robot time step size, and other known conditions are constructed.

Initial Spatiotemporal Trajectory Calculation
The initial spatiotemporal trajectory is the control point reference trajectory for subsequent trajectory instantiation, and the reasonableness of the initial spatiotemporal trajectory directly affects the performance and safety of the final trajectory result.
In this paper, a spatiotemporal variable-step-size A* algorithm is proposed for computing the initial spatiotemporal trajectory of incremental robots.The innovation of the algorithm is its new spatiotemporal child node searching method based on a variable time step to ensure that the robot completes the search at the target speed, which improves the practicality and applicability of the method.A new cost function and heuristic function were also designed to reduce the number of search calculations and improve the accuracy of the results.
In this work, the spatiotemporal 3D A* algorithm was selected for improvement.The A* algorithm is a commonly used search algorithm based on the principle of heuristic search, which means that instead of blindly exploring every possible path, the search is guided by some heuristic information, thus finding the best path more efficiently.The flow of the A* algorithm is described in detail in Section 3.3.
In general, the A-star algorithm finds the best path by evaluating the actual cost of nodes and heuristic estimates, and the algorithm is executed efficiently and reliably [27].
Since it is computationally inefficient to optimize the motion constraints in the initial spatiotemporal trajectory computation stage [28], and the motion constraints considered in the initial spatiotemporal trajectory have less influence on the final trajectory after instantiation, motion optimization is carried out in the trajectory instantiation step, and the algorithm is chosen to be improved without considering the kinematic model.
The process of calculating the initial spatiotemporal trajectory is as follows: Firstly, the search is started according to the constructed spatiotemporal grid map with the robot time step.The process of expanding the spatiotemporal nodes is carried out according to set instructions, and a series of constraints are considered for the node feasibility determination in the process.Then, the feasible nodes are evaluated through the calculation of heuristic and surrogate values until the target point is reached and the overall initial spatiotemporal trajectory is obtained.The expansion process is based on a variable time step to ensure that the incremental robot completes the search at the target speed.The search process is described in detail in Section 3.3.

Spatiotemporal Node Expansion and Feasibility Determination
The search process of the algorithm requires spatiotemporal node expansion.The node state space of the traditional A* algorithm is (x, y) [4].The X-Y-T three-dimensional spatiotemporal grid map used in this study increases the time dimension information and the corresponding velocity information, so the corresponding spatiotemporal variable-stepsize A* algorithm state space is (x, y, t); the first two items are the same as the node state space of the traditional A* algorithm, and the third item is the time node where the current position is located.The spatiotemporal node expansion approach is shown in Figure 5.

Spatiotemporal Node Expansion and Feasibility Determination
The search process of the algorithm requires spatiotemporal node expansion.The node state space of the traditional A* algorithm is (x, y) [4].The X-Y-T three-dimensional spatiotemporal grid map used in this study increases the time dimension information and the corresponding velocity information, so the corresponding spatiotemporal variablestep-size A* algorithm state space is (x, y, t); the first two items are the same as the node state space of the traditional A* algorithm, and the third item is the time node where the current position is located.The spatiotemporal node expansion approach is shown in Figure 5.The node expansion method based on the state space of spatiotemporal nodes adopted in this study involves expanding along the time axis T with a sampling time step, starting from the parent node, and the spatiotemporal expansion process of the child nodes is expressed as follows: where  is the time step of the same robot,  is the discrete forward direction angle, and  is the target speed of the robot.The time step length  of the same intelligent robot is given as follows: where  is the spatial grid step.Feasibility of the expanded nodes must also be determined [29].
The first is collision determination, which requires the child node to be split based on the minimum time step to obtain a series of transition nodes, and the child node can be considered safe only if neither the child node nor the transition node collides with the obstacle.In addition to collision detection, the child node and its transition nodes need to satisfy the scene boundary constraints and instantiation margin constraints.
The scene boundary constraint is used to ensure that the robot proceeds within the spatial range limited by the scene and does not go beyond the motion scene [30].Its representation is as follows: where  ,  ,  ,  are the upper and lower boundaries of the scene in the x-axis direction and the upper and lower boundaries of the scene in the y direction, respectively.The node expansion method based on the state space of spatiotemporal nodes adopted in this study involves expanding along the time axis T with a sampling time step, starting from the parent node, and the spatiotemporal expansion process of the child nodes is expressed as follows:    where d t is the time step of the same robot, θ i is the discrete forward direction angle, and v goal is the target speed of the robot.The time step length d t of the same intelligent robot is given as follows: where d xy is the spatial grid step.Feasibility of the expanded nodes must also be determined [29].
The first is collision determination, which requires the child node to be split based on the minimum time step to obtain a series of transition nodes, and the child node can be considered safe only if neither the child node nor the transition node collides with the obstacle.In addition to collision detection, the child node and its transition nodes need to satisfy the scene boundary constraints and instantiation margin constraints.
The scene boundary constraint is used to ensure that the robot proceeds within the spatial range limited by the scene and does not go beyond the motion scene [30].Its representation is as follows: where x upper , x lower , y upper , y lower are the upper and lower boundaries of the scene in the x-axis direction and the upper and lower boundaries of the scene in the y direction, respectively.
Sensors 2024, 24, 3639 9 of 28 The instantiation margin constraint is used to ensure a certain spatiotemporal margin as the optimization space and error space in the subsequent trajectory instantiation step.And it ensures that the trajectories will not collide, which is expressed as follows: are the upper and lower boundaries of the obstacles in the x, y, t directions, and I x , I y , I t are the instantiation margins in the x, y, t directions, respectively.
The instantiation margins include the B-spline fitting margin, control point optimization margin, speed control error margin, and robot geometry margin, and the instantiation margins I x , I y , I t in the three directions of x, y, t can be expressed as follows:    I x = w bx e b + w hx e h + w vx e v + e t I y = w by e b + w hy e h + w vy e v + e t I t = w bt e b + w vt e v + e t (10) where e b is the B-spline fitting margin, and w bx , w by , w bt are its coefficients in the x, y, t directions, respectively; e h is the control point optimization margin, and w hx , w hy are its coefficients in the x, y directions, respectively; e v is the speed control error margin, and w vx , w vy , w vt are its coefficients in the x, y, t directions, respectively; and e t is the robot geometry margin.
The instantiation margin in the x-axis direction is shown in Figure 6.
Sensors 2024, 24, x FOR PEER REVIEW 9 of 29 The instantiation margin constraint is used to ensure a certain spatiotemporal margin as the optimization space and error space in the subsequent trajectory instantiation step.And it ensures that the trajectories will not collide, which is expressed as follows: where  ,  ,  ,  ,  ,  are the upper and lower boundaries of the obstacles in the , ,  directions, and  ,  ,  are the instantiation margins in the x, y, t directions, respectively.
The instantiation margins include the B-spline fitting margin, control point optimization margin, speed control error margin, and robot geometry margin, and the instantiation margins  ,  ,  in the three directions of x, y, t can be expressed as follows: where  is the B-spline fitting margin, and  ,  ,  are its coefficients in the x, y, t directions, respectively;  is the control point optimization margin, and  ,  are its coefficients in the x, y directions, respectively;  is the speed control error margin, and  ,  ,  are its coefficients in the x, y, t directions, respectively; and  is the robot geometry margin.The instantiation margin in the x-axis direction is shown in Figure 6.The speed control error margin is used to ensure a certain control error of the robot to avoid the trajectory due to small errors in the control link, thus affecting the safe operation of the robot.It can be expressed as follows: where  is the target speed, and  is the maximum percentage of control error allowed.
The geometric margin of the robot is used to consider the physical shape of the robot in operation, and half of the maximum value of the length and width of the robot is selected as the safe collision avoidance condition, which can be expressed as follows: The speed control error margin is used to ensure a certain control error of the robot to avoid the trajectory due to small errors in the control link, thus affecting the safe operation of the robot.It can be expressed as follows: where v goal is the target speed, and m max is the maximum percentage of control error allowed.
The geometric margin of the robot is used to consider the physical shape of the robot in operation, and half of the maximum value of the length and width of the robot is selected as the safe collision avoidance condition, which can be expressed as follows: where l a , l b are the length and width of the robot, respectively.The B-spline fitting margin e b is used to avoid the trajectory boundary after B-spline curve fitting exceeds the safety range, and the control point optimization margin e h is used to ensure that the control points change range in numerical optimization.These two constraints are related to the subsequent instantiation, which is shown in Section 4.1.
The next step of cost evaluation can be performed only after both the child nodes and transition nodes satisfy the constraints and collision detection.Using the improved node expansion approach, the computation of robot trajectories with different target velocities can be achieved while ensuring safety and no collision.

Algorithm Numerical Design
The numerical design of the spatiotemporal variable-step-size A* algorithm mainly consists of two parts: the heuristic function and the cost function.
The spatiotemporal node heuristic function is used to guide the algorithm to search in the direction close to the target point.The initial spatiotemporal trajectory obtained using the spatiotemporal variable-step-size A* algorithm is a trajectory based on the direct connection of the grid endpoints.Information other than the distance from the current point to the target point has little effect on the heuristic search process.The proposed method uses spatiotemporal Euclidean distance as a heuristic function to reduce the amount of computation for a complex, dynamic scene [21].The child nodes N i (x i , y i , t i ) of the heuristic function H i can be expressed as follows: where the first term is the planar Euclidean distance heuristic term; x goal and y goal are the x and y coordinates of the target point, respectively; the second term is the temporal distance heuristic term; t goal is the relative time coordinate of the target node; and w H1 and w H2 are the weights of the corresponding heuristic terms, respectively.The cost function is used to calculate the cumulative cost from the search start node to the current node to evaluate the optimal expansion node.The total cost G i is composed of the cost G p of the parent node N p and the transition cost between the parent node N p and the child node N i , which can be expressed as follows: where G p is the cost of the parent node, E i is the cost of the speed deviation of the child node, and E s is the cost of the security risk of the child node.The cost of the speed deviation of the child node can be expressed as follows: where v i is the current speed of the child node, and v goal is the target speed of the robot.
Wang M Q's research [3] was referred to in this study to establish the risk field in the spatiotemporal grid map and improve the security and accuracy of the spatiotemporal variable-step-size A* algorithm.To reduce unnecessary computation in complex scenes, the node cost function only considers the risk cost of static obstacles.The risk field of a point (x i , y i ) in the field can be expressed as follows: where u x , u y are the x and y coordinates of the obstacle risk source center; σ xg , σ yg are the distribution factors of obstacles in the x and y directions, respectively.
Therefore, the static risk field formed by the stationary object O (x o , y o ) in the road at its surrounding point (x, y) can be expressed as follows: where P(x, y) is the risk distribution model of the robot at the point (x, y), and r |r| is the unit vector of the direction of the static field strength.

Spatiotemporal Variable-Step-Size A* Algorithm Flow
The A* algorithm is structured as follows: Initially, a grid map is established, with the current incremental robot's starting position serving as the search starting node, denoted as S. A variable time step is then computed based on the robot's target speed, and spatiotemporal nodes are expanded accordingly.The starting node, S, is enlisted in a roster of nodes earmarked for consideration, with its initial G value set to signify the actual cost from the starting point to the current node.Subsequently, nodes closest to the starting point are iteratively selected from this roster.
During the expansion process, collision detection and various constraints are taken into account.Feasibility assessments are conducted concerning both child nodes and their transitional counterparts.Additionally, the heuristic function and cost function are leveraged to gauge the cost of nodes, aiding in the quest for the optimal expansion node.
For each chosen node, its H value, representing a heuristic estimation of the anticipated cost from the current node to the target node, is computed, and its F value, the sum of G and H, is updated.This computation aids in evaluating the prospective value of the current node as an intermediary.
Subsequently, the neighbors of the current node are inspected, and their G and H values are computed.If a neighbor node is absent from the roster of nodes under consideration, it is appended, and its G and H values are adjusted accordingly.Conversely, if the node already exists in the roster, its freshly calculated G value is compared with the existing one, with the smaller value retained.
This iterative process persists until either the target node is reached or the roster of nodes under consideration becomes empty.Attainment of the target node signifies the discovery of the optimal path.Conversely, if the roster becomes depleted without encountering the target node, it indicates the absence of a feasible path from the starting point to the target.
Throughout the expansion process, the viability of child nodes and their transitional counterparts is assessed, while heuristic and cost functions are employed to evaluate node costs, culminating in the identification of the optimal expansion node.This process continues until the search incorporates the target node, thus concluding the search procedure of the spatiotemporal variable-step-size A* algorithm.The ideal path is obtained at the end by backtracking.Consequently, the initial spatiotemporal trajectory, delineated by discrete grid nodes, is also derived.The detailed search flow is illustrated in Figure 7.

Spatiotemporal Trajectory Instantiation
The initial spatiotemporal trajectory derived from the spatiotemporal A* algorithm is based on the direct connection of the 3D spatiotemporal grid endpoints, which is jagged, does not conform to the kinematics of the wheeled mobile robot, and fails to meet the control requirements of the mobile robot.To obtain a smooth, safe, and feasible trajectory, it is necessary to instantiate the spatiotemporal trajectory.
Curve fitting can be used to instantiate the initial spatiotemporal trajectory.Compared with other curves, the B-spline curve has the advantages of convex envelope characteristics, local adjustment characteristics, and hodograph characteristics, so it was chosen for instantiation.
The instantiation process is as follows: the initial spatiotemporal trajectory node is taken as the control point; the B-spline curve is used for fitting; all kinds of constraints are comprehensively considered; the objective function is set; the control point is taken as the variable for optimization and solving; and then the final spatiotemporal trajectory is obtained.

B-Spline-Based Instantiation
The B-spline curve is controlled by three factors: the control point, order, and basis function, and the general expression of the B-spline can be written as follows:

Spatiotemporal Trajectory Instantiation
The initial spatiotemporal trajectory derived from the spatiotemporal A* algorithm is based on the direct connection of the 3D spatiotemporal grid endpoints, which is jagged, does not conform to the kinematics of the wheeled mobile robot, and fails to meet the control requirements of the mobile robot.To obtain a smooth, safe, and feasible trajectory, it is necessary to instantiate the spatiotemporal trajectory.
Curve fitting can be used to instantiate the initial spatiotemporal trajectory.Compared with other curves, the B-spline curve has the advantages of convex envelope characteristics, local adjustment characteristics, and hodograph characteristics, so it was chosen for instantiation.
The instantiation process is as follows: the initial spatiotemporal trajectory node is taken as the control point; the B-spline curve is used for fitting; all kinds of constraints are comprehensively considered; the objective function is set; the control point is taken as the variable for optimization and solving; and then the final spatiotemporal trajectory is obtained.

B-Spline-Based Instantiation
The B-spline curve is controlled by three factors: the control point, order, and basis function, and the general expression of the B-spline can be written as follows: where Q i is the control point, k is the order, and B i,k (t) is the basis function, which can be derived from the Cox-de Boor formula [31].
We associate the spatial coordinates of each 3D node in the initial spatiotemporal trajectory with the temporal coordinates t i , i ∈ [k, M − k] and normalize the time to s(t) = (t According to Zhang T's research [32], the formulation of the B-spline can be expressed in terms of a matrix function as follows: In the 3D spatiotemporal trajectory, the order of the B-spline is set to k = 3 to keep the velocity and acceleration changes of the final trajectory smooth, and a higher order can be used if needed.
The initial spatiotemporal trajectory nodes are used as control points, and after fitting using the B-spline, the curve does not pass through the control points because of the Bspline curve characteristic.If left unprocessed, in some extreme cases, even if the given control point is in the safety interval, the trajectory may still collide, so the B-spline fitting margin determined in the spatiotemporal node feasibility determination step is needed.
Setting the B-spline fitting margin requires the distance information from the control point to the B-spline curve to be determined.With reference to Wang W's research [33], in the definition of the point-curve distance, for a certain control point Q i x qi , y qi , t qi in the X-Y-T three-dimensional spatiotemporal coordinate system, the nearest node P i x pi , y pi , t pi can be found in the B-spline curve with the distance from the node, then the distance d from the control point to the curve can be expressed as follows: If the function is used to calculate the B-spline fitting margin in real time, it will lead to excessive computation in the node expansion process, so a fixed value is preferred as the B-spline fitting margin here.According to the local variability of the B-spline curve, if only a change in a control point takes place, only local changes in the curve occur, and the other parts of the curve are not changed [34].Thus, the third-order B-spline curve changes in a control point Q i , the impact of the curve segments of the four control points to determine the direction of expansion is limited, and the spatial mesh step d xy is fixed for the exhaustive substitution validation.The maximum distance between the control points and the curve is used as the B-spline fitting margin.The subsequent optimization has node safety constraints, again to ensure that the optimization to avoid collision occurs, successfully reduce the amount of computation, and ensure the optimization of the spatial safety of the trajectory.

Constraint-Based Optimization
To ensure that the optimization interval is sufficient and reduces the waste of the solution space, inspired by Zhou B's research [34], for a k-degree B-spline trajectory defined by M + 1 control points The first and last k control points should not be changed because they determine the boundary state.
The control points [Q k , • • • , Q M−k ] are used as variables, and the optimal control points are obtained by constructing a quadratic programming (QP) optimization problem.To ensure the uniformity of the B-spline curve, the control points [Q k , • • • , Q M−k ] only change their spatial positions, i.e., only the x and y coordinates change within the optimization boundary values, and the t coordinate remains unchanged.
The control point optimization margin value e h is determined by the optimization boundary margin in the feasibility step, which determines the range of coordinate changes of the optimized control point, and the value is adjustable so that a better value can be obtained by repeating the test.
The objective function of optimization consists of multiple cost functions, and each cost function is specified first.Finally, the coefficients of each item in the cost function are empirically adjusted.The objective function is shown as follows: where the cost function consists of three terms: the smooth optimization function f s , safety optimization function f d , and speed optimization function f v ; λ s , λ d , λ v are the respective coefficients.
According to the hodograph property of the B-spline curve, the derivatives of each order of the curve, which is still a B-spline curve, have the same properties and can be linearly represented by the original control points.Therefore, the velocity and acceleration as the first-and second-order derivatives of the B-spline curve can be expressed linearly by the control points.The velocity v i and acceleration a i can be obtained as follows: Referring to Zhu Z's research [35], the smooth term uses the elastic band algorithm to improve the smoothness of the trajectory, and the control points should be uniformly distributed in a straight line.The smaller the sum of the equation, the smoother the trajectory.The specific smoothness term is expressed as follows: The safety term keeps the control points as far away as possible from the nearest obstacles and is represented according to the risk field.The specific safety term is expressed as follows: where E s (Q i ) is the risk field value of the control point, as shown in Equation ( 17); w d is the logical indicator; and d 0 is the safety risk threshold.The speed term is the penalty term for the deviation of the speed of the control point from the desired speed.The specific speed term is expressed as follows: where v goal is the target speed, and v i is the trajectory speed.
The optimization process also needs to meet certain constraints to ensure the feasibility and safety of the trajectory.The constraints are as follows: the scene boundary constraints, control point optimization margin constraints, node safety constraints, speed constraints, and acceleration constraints.
The control point scene boundary constraints are used to ensure that the control points are within the scene boundary.They are constructed as follows: The control point optimization margin constraint is used to ensure that the xy coordinate of the control point changes within the optimization margin value.It is constructed as follows: x oldi − e h ≤ x qi ≤ x oldi + e h y oldi − e h ≤ y qi ≤ y oldi + e h (27) where x oldi , y oldi are the corresponding control point xy coordinates in the initial spatiotemporal trajectory, and e h is the control point optimization margin value in the instantiation margin, which is used in Equation ( 10) as part of the instantiation margins.The value can be modified to adjust the scope of control point optimization.In the geometric range of this experiment, e h = 1.5 m is generally taken.The velocity constraints and acceleration constraints are used to ensure that the motion of the robot is feasible.Considering the dynamics of the robot, the velocity constraints and acceleration constraints of the trajectory points are constructed as follows: where v min and v max are the minimum and maximum values of velocity, and a min , a max are the minimum and maximum values of acceleration, respectively.The specific experimental value depends on the specific settings in the experimental scene.
The node safety constraints are used to ensure that the final trajectory curve meets the safety constraints, and they are constructed as follows: are the upper and lower boundaries of the obstacle in the x, y, t directions; the specific experimental value depends on the specific settings in the experimental scene; and x pi , y pi are the coordinates of the nodes corresponding to the control points on the constructed curve, respectively.
Since the node safety constraints are the only constraints for nodes, rather than control points, it is necessary to introduce the corresponding optimization adjustment strategy.When the node safety constraints are not satisfied at some nodes, the optimization algorithm adopts the strategy of gradually adjusting the control points to achieve constraint satisfaction, and its adjustment direction θ adj and adjustment step size λ adj are shown as follows: θ adj =arctan where u x , u y are the coordinates of the center point of the nearest obstacle; x wri , y wri are the coordinates of the control point when the node safety constraints are not met; and w adj is the weight of the adjustment step.The specific adjustment of the control point xy coordinates is shown as follows:    x qi = x oldqi + λ adj cos θ adj y qi = y oldqi + λ adj sin θ adj (31) Finally, the smooth distribution of control points without collision and conforming to the motion constraints can be obtained through secondary optimization, and the final incremental spatiotemporal trajectory of the robot is obtained after fitting as shown in Figure 8.The red curve is the final smooth trajectory.Finally, the smooth distribution of control points without collision and conforming to the motion constraints can be obtained through secondary optimization, and the final incremental spatiotemporal trajectory of the robot is obtained after fitting as shown in Figure 8.The red curve is the final smooth trajectory.

Simulation and Discussion
To fully verify the effectiveness and superiority of the spatiotemporal variable-step A* algorithm planning method proposed in this paper, complex motion scenarios were used for simulation.The simulations were conducted in Python using the OSQP solver.All experiments were performed on a quad-core 3.20 GHz Intel i5-6500 processor.
The simulation and comparison experiments were conducted in two distinct settings.
The first group was carried out in a small-scale scenario and compared with the spatiotemporal decoupling planning algorithm CL-CBS [7].The aim was to assess the STP-STVS-A*'s performance in incremental robot trajectory planning within a small passing space.
The second group was conducted in a larger-scale scenario, comparing the algorithm against ETPMR, the state-of-the-art spatiotemporal joint planning algorithm [36].This comparison aimed to highlight the differences between this method and other spatiotemporal joint planning approaches.

Simulation and Discussion
To fully verify the effectiveness and superiority of the spatiotemporal variable-step A* algorithm planning method proposed in this paper, complex motion scenarios were used for simulation.The simulations were conducted in Python using the OSQP solver.All experiments were performed on a quad-core 3.20 GHz Intel i5-6500 processor.
The simulation and comparison experiments were conducted in two distinct settings.The first group was carried out in a small-scale scenario and compared with the spatiotemporal decoupling planning algorithm CL-CBS [7].The aim was to assess the STP-STVS-A*'s performance in incremental robot trajectory planning within a small passing space.
The second group was conducted in a larger-scale scenario, comparing the algorithm against ETPMR, the state-of-the-art spatiotemporal joint planning algorithm [36].This comparison aimed to highlight the differences between this method and other spatiotemporal joint planning approaches.

Small-Scale Scenario Simulation
In the first simulation process, we selected a field-shaped, complex motion scene containing multiple motion conflict points.This scene covers horizontal and vertical conflicts between multiple robots and can be effectively used to test the planning ability of the spatiotemporally variable-step-size A* algorithm in complex situations.
Due to the complexity and large span of the motion scene, time domain T is set to 70 s, and the predicted length of obstacle trajectories of the existing robots and the predicted length of static obstacles, Tp, should be consistent with the planning time domain, so Tp = 70 s.The other relevant parameters of the experiment are given in Table 1.The experimental scene contains four existing robots that have already run in the scene and one introduced incremental robot.The parameters of each robot are given in Table 2.As shown in Figure 9, in the setup scene, there are already four existing robots running in the scene.The yellow obstacles in the figure indicate the spatiotemporal occupation state of the existing robots, the red obstacles indicate the spatiotemporal occupation state of the incremental robot, and the red curves indicate the spatiotemporal trajectories of the incremental robot.The incremental robot starts running from the 15th second in the positive direction of the x-axis at a speed of 1 m/s.To avoid colliding with the running, pre-existing intelligent robot 3, incremental robot 4 delays its turning time, ensures a safe traveling space, and arrives at the target position in a manner that is close to the shortest traveling trajectory without affecting the operation of other pre-existing intelligent robots.
Sensors 2024, 24, x FOR PEER REVIEW 18 of 29 calculating the speed and the path result separately.The calculation of this method is also more conservative in a complex, dynamic environment, which can easily lead to a suboptimal trajectory.In addition, the trajectory results of the CL-CBS for a wheeled mobile robot are too tortuous to be used.Moreover, the CL-CBS cannot be used to plan the trajectories of incremental robots without affecting the existing running robots, so there is obvious interference with the trajectories of robot 1 and robot 2. In contrast, the method proposed in this paper can be used for trajectory computation of incremental robots and can repeatedly iterate incremental robots without affecting the existing running robots, making it more practical in some scenarios.For comparison and discussion, the CL-CBS in Wen L's research [7] was chosen to conduct simulation experiments in the same scene.The experimental results of the    Figure 11 shows the trajectory of the STP-STVS-A* and the CL-CBS.It can be seen that the trajectory of the method proposed in this paper is smoother and closer to the shortest traveling trajectory compared to the CL-CBS.This is due to the spatiotemporal decoupling planning used in the CL-CBS, which generates the final trajectory by calculating the speed and the path result separately.The calculation of this method is also more conservative in a complex, dynamic environment, which can easily lead to a suboptimal trajectory.In addition, the trajectory results of the CL-CBS for a wheeled mobile robot are too tortuous to be used.Figure 12 shows the speed curve of each robot constructed using the results of this method.It can be seen that the speed of each robot is basically kept at the target speed for movement.Moreover, the CL-CBS cannot be used to plan the trajectories of incremental robots without affecting the existing running robots, so there is obvious interference with the trajectories of robot 1 and robot 2. In contrast, the method proposed in this paper can be used for trajectory computation of incremental robots and can repeatedly iterate incremental robots without affecting the existing running robots, making it more practical in some scenarios.
Figure 12 shows the speed curve of each robot constructed using the results of this method.It can be seen that the speed of each robot is basically kept at the target speed for movement.Figure 12 shows the speed curve of each robot constructed using the results of this method.It can be seen that the speed of each robot is basically kept at the target speed for movement.The speed error rate was introduced as an index to better illustrate the speed smoothness and speed fluctuation.The speed error rate can be expressed as follows: where  is the current speed of the robot in the result of the algorithm, and  is the target speed of the robot.
Figure 13 shows the curve of the speed error rate for each robot in the results of the STP-STVS-A* and the CL-CBS.The speed error rate was introduced as an index to better illustrate the speed smoothness and speed fluctuation.The speed error rate can be expressed as follows: where v ri is the current speed of the robot in the result of the algorithm, and v goal is the target speed of the robot.
Figure 13 shows the curve of the speed error rate for each robot in the results of the STP-STVS-A* and the CL-CBS.Figure 14 shows the distribution of the speed error rate for each robot in the results of the STP-STVS-A* and the CL-CBS.
It can be seen that the speed of the robot in the CL-CBS varies more drastically, which is as attributed to the lack of optimization and instantiation steps, so there is no smoothing of the speed.The speed of the robot planned using this method changes smoothly and continuously and rarely changes drastically, and the difference with the target speed is basically no more than 10%, which ensures that the robot is more capable of running in the set target state.In particular, the computational target, i.e., incremental robot 4, has a stable change of speed and smooth and efficient movement.Figure 14 shows the distribution of the speed error rate for each robot in the results of the STP-STVS-A* and the CL-CBS.
It can be seen that the speed of the robot in the CL-CBS varies more drastically, which is as attributed to the lack of optimization and instantiation steps, so there is no smoothing of the speed.The speed of the robot planned using this method changes smoothly and continuously and rarely changes drastically, and the difference with the target speed is basically no more than 10%, which ensures that the robot is more capable of running in the set target state.In particular, the computational target, i.e., incremental robot 4, has a stable change of speed and smooth and efficient movement.Table 3 shows the comparison of the distance traveled by each robot for the two methods.It can be seen that the trajectory of the STP-STVS-A* proposed in this paper is shorter after the spatiotemporal trajectory instantiation optimization compared to the pre-optimization trajectory, and the instantiation processing can make the resultant trajectory smoother and more efficient.Compared with the CL-CBS, the trajectory of the STP-STVS- It can seen that the speed of the robot in the CL-CBS varies more drastically, which is as attributed to the lack of optimization and instantiation steps, so there is no smoothing of the speed.The speed of the robot planned using this method changes smoothly and continuously and rarely changes drastically, and the difference with the target speed is basically no more than 10%, which ensures that the robot is more capable of running in the set target state.In particular, the computational target, i.e., incremental robot 4, has a stable change of speed and smooth and efficient movement.
Table 3 shows the comparison of the distance traveled by each robot for the two methods.It can be seen that the trajectory of the STP-STVS-A* proposed in this paper is shorter after the spatiotemporal trajectory instantiation optimization compared to the preoptimization trajectory, and the instantiation processing can make the resultant trajectory smoother and more efficient.Compared with the CL-CBS, the trajectory of the STP-STVS-A* proposed in this paper has a shorter travel length and is closer to the shortest driving trajectory.Because the method proposed in this paper utilizes the trajectory search method with a variable time step, each robot can run at different target speeds, which is more practical in some scenarios.

Large-Scale Scenario Simulation
To further corroborate the effectiveness of this method, an additional simulation in a larger-scale scenario is conducted, comparing it with other methods as detailed below.
In contrast to the first simulation experiments, a larger-scale scenario with increased size and static obstacles was employed.This setting allows for a comparison of the method's effectiveness in handling incremental robots amidst a larger passable area.
Given the expanded scope of the motion scene, a larger time domain is required.Accordingly, the time domain (T) is set to 140 s, aligning with both the predicted length of obstacle trajectories for existing robots and the predicted length of static obstacles (Tp), also set to 140 s.The size of the robot remains consistent with that of the initial experiment, while the scene size is enlarged.Detailed specifications are provided in Table 4.

Parameter Value
Total scene length L/m 100 Total scene width W/m 120 The experimental scene contains seven existing robots that have already run in the scene and one introduced incremental robot.The parameters of each robot are given in Table 5.As depicted in Figure 15, the scene is set with seven existing robots already in motion.Yellow obstacles represent the spatiotemporal occupancy of these existing robots, while red obstacles indicate the spatiotemporal occupancy of the incremental robot.Incremental robot 7 commences its motion at a speed of 1 m/s along the positive x-axis direction starting from the 20th second.To avoid collision with the moving intelligent robot 5, incremental robot 7 veers left, endeavoring to maintain its speed while ensuring a safe driving space.It reaches the target position following a trajectory closely resembling the shortest driving path, without disrupting the operation of other existing intelligent robots.
For comparison, simulation experiments were conducted using the Efficient Trajectory Planning for Multiple Non-holonomic Mobile Robots (ETPMR) from Li J's research [36].This method utilizes spatiotemporal joint planning and a graph-based multi-agent path planner.The results, shown in Figure 16, were standardized to a uniform speed of 1 m/s for all robots.The method does not use a spatiotemporal grid map to display the results, so the planar graph output by its original program is used in Figure 16.
Figure 17 shows the trajectories generated by the STP-STVS-A* and the ETPMR.Notably, the trajectory produced by the STP-STVS-A* is visibly shorter and more direct.This discrepancy arises from the priority grouping mechanism employed in the ETPMR, which results in certain robot outcomes being constrained by priority, introducing a distinct disruptive factor not present in our approach.Furthermore, in scenarios with ample passable space, the ETPMR tends to adopt a more conservative approach.The majority of robot trajectories converge within the central channel, leaving more free space on either side, potentially leading to suboptimal trajectories.Nonetheless, in comparison to the CL-CBS, the ETPMR yields smoother trajectories and is suitable for application in wheeled mobile robots.
Similar to traditional planning methods, the ETPMR encounters challenges in planning the trajectory of incremental robots without impacting the motion of existing operating robots, resulting in notable interference with the trajectories of robot 3 and robot 5.In contrast, the method proposed in this paper facilitates trajectory calculation for incremental robots without disrupting the motion of existing operating robots.This capability allows for the iterative planning of incremental robots without affecting ongoing operations, rendering it more practical in certain scenarios.For comparison, simulation experiments were conducted using the Efficient Trajectory Planning for Multiple Non-holonomic Mobile Robots (ETPMR) from Li J's research [36].This method utilizes spatiotemporal joint planning and a graph-based multi-agent path planner.The results, shown in Figure 16, were standardized to a uniform speed of 1 m/s for all robots.The method does not use a spatiotemporal grid map to display the results, so the planar graph output by its original program is used in Figure 16.The representation is the same as that of the first simulation experiment.Figure 18 shows the curve of the speed error rate for each robot in the results of the STP-STVS-A* and the ETPMR.Figure 19 shows the distribution of the speed error rate for each robot in the results of the STP-STVS-A* and the ETPMR.
It is evident that the STP-STVS-A* exhibits a relatively low error rate, with differences from the target speed typically remaining below 20%.This is particularly notable for incremental robot 7, where the STP-STVS-A* excels.In contrast, the space segmentation approach utilized in the ETPMR impacts the passable space, leading to increased velocity fluctuations.Figure 17 shows the trajectories generated by the STP-STVS-A* and the ETPMR.Notably, the trajectory produced by the STP-STVS-A* is visibly shorter and more direct.This discrepancy arises from the priority grouping mechanism employed in the ETPMR, which results in certain robot outcomes being constrained by priority, introducing a distinct disruptive factor not present in our approach.Furthermore, in scenarios with ample passable space, the ETPMR tends to adopt a more conservative approach.The majority of robot trajectories converge within the central channel, leaving more free space on either side, potentially leading to suboptimal trajectories.Nonetheless, in comparison to the CL-CBS, the ETPMR yields smoother trajectories and is suitable for application in wheeled mobile robots.The representation is the same as that of the first simulation experiment.Figure 18 shows the curve of the speed error rate for each robot in the results of the STP-STVS-A* and the ETPMR.Figure 19 shows the distribution of the speed error rate for each robot in the results of the STP-STVS-A* and the ETPMR.
It is evident that the STP-STVS-A* exhibits a relatively low error rate, with differences from the target speed typically remaining below 20%.This is particularly notable for incremental robot 7, where the STP-STVS-A* excels.In contrast, the space segmentation approach utilized in the ETPMR impacts the passable space, leading to increased velocity fluctuations.Similar to traditional planning methods, the ETPMR encounters challenges in planning the trajectory of incremental robots without impacting the motion of existing operating robots, resulting in notable interference with the trajectories of robot 3 and robot 5.In contrast, the method proposed in this paper facilitates trajectory calculation for incremental robots without disrupting the motion of existing operating robots.This capability allows for the iterative planning of incremental robots without affecting ongoing operations, rendering it more practical in certain scenarios.
The representation is the same as that of the first simulation experiment.Figure 18 shows the curve of the speed error rate for each robot in the results of the STP-STVS-A* and the ETPMR.Figure 19 shows distribution of the speed error rate for each robot in the results of the STP-STVS-A* and the ETPMR.Table 6 provides a comparison of the distance traveled by each robot under the two methods.As observed in the first experiment, trajectories are shorter after spatiotemporal trajectory instantiation optimization.Furthermore, compared to the ETPMR, trajectories generated by the STP-STVS-A* are shorter and closer to the shortest driving path.This is attributed to the STP-STVS-A*'s utilization of a trajectory search approach with variable time steps, enabling each robot to operate at different target speeds-a feature that enhances practicality in certain scenarios.Table 6 provides a comparison of the distance traveled by each robot under the two methods.As observed in the first experiment, trajectories are shorter after spatiotemporal trajectory instantiation optimization.Furthermore, compared to the ETPMR, trajectories generated by the STP-STVS-A* are shorter and closer to the shortest driving path.This is attributed to the STP-STVS-A*'s utilization of a trajectory search approach with variable time steps, enabling each robot to operate at different target speeds-a feature that enhances practicality in certain scenarios.It is evident that the STP-STVS-A* exhibits a relatively low error rate, with differences from the target speed typically remaining below 20%.This is particularly notable for incremental robot 7, where the STP-STVS-A* excels.In contrast, the space segmentation approach utilized in the ETPMR impacts the passable space, leading to increased velocity fluctuations.
Table 6 provides a comparison of the distance traveled by each robot under the two methods.As observed in the first experiment, trajectories are shorter after spatiotemporal trajectory instantiation optimization.Furthermore, compared to the ETPMR, trajectories generated by the STP-STVS-A* are shorter and closer to the shortest driving path.This is attributed to the STP-STVS-A*'s utilization of a trajectory search approach with variable time steps, enabling each robot to operate at different target speeds-a feature that enhances practicality in certain scenarios.However, a notable drawback of this method is its computational efficiency.In smallscale simulations, the algorithm's computation time is 2.02 s, compared to 0.12 s for the CL-CBS.In large-scale scenario simulations, the computation time of the STP-STVS-A* increases to 4.20 s, while the ETPMR algorithm's computation time is 0.62 s.The reasons for the long calculation time of this method are as follows: To ensure the safety of robot motion, the algorithm increases the partial collision decision margin, and the introduction of a risk field also augments the computational load.Furthermore, to ensure iterability, part of the collision determination of the existing robot will be repeated.In aspects other than technical methods, the algorithm is written in Python, while the CL-CBS and ETPMRs are written in C. If the algorithm was converted into C, it is anticipated that the computation time could be reduced several-fold, thereby narrowing the time gap.However, in the problem addressed in this paper, the incremental agent trajectory is considered as global planning; the primary concern is the excellence of the resulting trajectory's performance.There is less need for immediacy in this problem.
The method proposed in this paper is computed in a three-dimensional spatiotemporal setting, which leads to a solution space with a more complete trajectory.The initial spatiotemporal trajectory search using the spatiotemporal variable-step-size A* algorithm effectively takes into account safety while enhancing the flexibility of the solution so that the behavioral performance is more flexible, the results are more reasonable, and the trajectory planning for incremental robots can be carried out without affecting the existing robots.

Discussion
The method proposed in this paper holds significant promise for solving the safe trajectory planning challenges of incremental wheeled mobile robots.It has potential applications in various fields, such as intelligent networked vehicles and storage and transportation robots.
For instance, in intelligent networked vehicles, where the iterative calculation of trajectories is crucial, this method can be utilized to determine spatiotemporal trajectories and devise macro-control strategies for safe and efficient traffic flow.Similarly, in scenarios involving incremental robots like those in storage and transportation, this method can optimize robot movement trajectories to enhance transportation efficiency within warehouses.
While our approach demonstrates promising results in simulation tests, it may encounter challenges in real-world scenarios due to factors like sensor errors, environmental fluctuations, and external disturbances.Despite incorporating constraints like speed control error margins, due to the error between the robot position and the calculated trajectory in practical application, the error may accumulate after multiple iterations of different robots.Moreover, it is difficult to control the timing of multiple robots entering the scene with absolute accuracy, and the accumulation of errors cannot be ignored.Therefore, it is necessary to further study how to reduce the impact of errors.
In conclusion, the proposed path planning method carries both theoretical and practical significance, it faces challenges and limitations in real-world application.Further research and refinement are necessary to effectively apply this method in practical scenarios.

Conclusions
This paper proposes an incremental robot trajectory planning method based on the spatiotemporal variable-step-size A* algorithm to address the problem of safe trajectory planning for incremental robots in multi-intelligent complex scenarios.After constructing the known conditions, the initial spatiotemporal trajectory computation of the target speed can be set using the spatiotemporal variable-step-size A* algorithm, which ensures that the search is completed at the target speed based on the variable time step and ensures that the initial spatiotemporal of the robot is safe, and there is room for optimization through the node feasibility determination.Then, by using the obtained initial spatiotemporal trajectory nodes as control points, fitting with B-spline curves, and numerical optimization, the trajectory instantiation is realized, and the final smooth spatiotemporal trajectory is generated.
Simulation results show that the proposed spatiotemporal joint planning method has smoother trajectory paths and velocities, making it more suitable for wheeled mobile robots.Different target velocities can also be set to iteratively compute incremental robots without affecting the motion of existing robots, which makes this method suitable for trajectory computation in complex motion scenarios and more flexible than the traditional planning methods.The planning results also show increased safety and efficiency.
In future work, we intend to validate our algorithm through experimental analysis using actual robots.This will involve testing the algorithm's performance under various practical conditions.By conducting these experiments, we aim to further demonstrate the practical applicability and effectiveness of our method in real-world scenarios.Additionally, we plan to incorporate more complex spatiotemporal constraints into the planning process and model the inconsistency between different robots in the cost function, which will aid adaptation to more complex motion scenarios in multi-agent robotic systems.

Figure 1 .
Figure 1.The overall flow of the method.

Figure 1 .
Figure 1.The overall flow of the method.

Figure 3 .
Figure 3. Illustration of variable time step lengths for different robots.

Figure 4 .
Figure 4. Illustration of variable time step lengths for the same robot.

Figure 7 .
Figure 7. Search flow chart of spatiotemporal variable-step-size A* algorithm.

Figure 7 .
Figure 7. Search flow chart of spatiotemporal variable-step-size A* algorithm.
and lower boundaries of the obstacles in the x, y, t directions, respectively.The specific experimental value depends on the specific settings in the experimental scene.

+
w hx e v + e tx ≤ x pi ≤ x upper b − w hx e v − e tx y lower b + w hy e v + e ty ≤ y pi ≤ y upper b − w hy e v − e ty ( ,  are the coordinates of the center point of the nearest obstacle;  ,  are the coordinates of the control point when the node safety constraints are not met; and  is the weight of the adjustment step.The specific adjustment of the control point xy coordinates is shown as follows:

Figure 8 .
Figure 8.The final spatiotemporal trajectory of the incremental robot.

Figure 8 .
Figure 8.The final spatiotemporal trajectory of the incremental robot.

Sensors 2024 ,
24, 3639 18 of 28 with the CL-CBS are shown in Figure 10.Since the running speed of each robot cannot be set individually in the CL-CBS, all the robots can only run at a uniform speed of 1 m/s.

Figure 14 Figure 13 .
Figure 14 shows the distribution of the speed error rate for each robot in the results of the STP-STVS-A* and the CL-CBS.

Table 1 .
Parameters of a simulation experiment.

Table 2 .
Parameters of simulation robots.

Table 4 .
Parameters of the second simulation.

Table 5 .
Parameters of second simulation's

Table 7 .
Comparison of method results.