Next Article in Journal
Optimized Lyapunov-Theory-Based Filter for MIMO Time-Varying Uncertain Nonlinear Systems with Measurement Noises Using Multi-Dimensional Taylor Network
Previous Article in Journal
SMART-CROWD: A System Architecture for Intelligent Assessment of Crowdsourcing Maturity in Urban Mobility Governance
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Dual Approach to the A* Algorithm to Generate Consistent Trajectories for the Leader–Follower Scheme

by
Griselda Stephany Abarca-Jiménez
,
Manuel Vladimir Vega-Blanco
*,
Jesús Mares-Carreño
,
Juan Cruz-Castro
and
Yunuén López-Grijalba
Unidad Profesional Interdisciplinaria de Ingeniería Campus Hidalgo (UPIIH), Instituto Politécnico Nacional (IPN), Carretera Pachuca—Actopan Kilómetro 1+500, Distrito de Educación, Salud, Ciencia, Tecnología e Innovación, San Agustín Tlaxiaca 42162, Hidalgo, Mexico
*
Author to whom correspondence should be addressed.
Appl. Syst. Innov. 2026, 9(4), 78; https://doi.org/10.3390/asi9040078
Submission received: 27 February 2026 / Revised: 1 April 2026 / Accepted: 3 April 2026 / Published: 16 April 2026
(This article belongs to the Topic Collection Series on Applied System Innovation)

Abstract

Path planning and formation control in leader–follower robotic systems are active areas of research, as both are highly relevant to the proper execution of the assigned task. In this work, a dual approach to the A* algorithm is applied to generate consistent trajectories for a multi-agent robotic system with a leader–follower scheme. The conventional A* algorithm aims to minimize the cost of finding the best path by minimizing distances. In this case, a modified A* algorithm is used because, although decision-making also involves choosing among eight options or cells, the goal is not to minimize distance; instead, the focus is on analyzing the direction of acceleration. The proposed algorithm is robust regarding the initial and relative pose of the leader with respect to the followers. The leader is tracked using a digital accelerometer. The algorithm is tested by simulating various patterns and implemented in two experimental test scenarios: the first with differential mobile robots, and the second with an Ackerman-type mobile robot. In both scenarios, the trajectories were achieved with deviations in x and y between the follower’s path and the leader’s path of less than 0.03, and the leader’s pose independence was maintained.

1. Introduction

There are multiple efforts to develop mathematical models for planning robot trajectories, whether in teleoperated systems, swarm robotics, multi-agent robotics, or leader–follower systems [1,2,3,4,5,6]. Path planning and formation control in multi-agent and leader–follower systems remain active research areas, as shown in reviews [7,8,9]. Several techniques can be used to maintain a formation in a group of robots, such as artificial potential fields where the leader is usually assigned with a target destination and the followers receive the desired position and use local information to track this position by using a distance-bearing control or relative coordinates [10,11]; differential games schemes which involve hierarchical dynamic optimization, by using the tracking cost function for the leader robot and the formation cost functions for follower robots, where the leader makes decisions anticipating the optimal response of the followers [12]; complex Laplacian technique where weighted edges are employed to represent the relative positioning of robots in a 2D plane, with the condition that for achieving a desired formation the graph modeling the interaction must be 2-rooted [13]; predictive control techniques focused on handling the future dynamics of both the leader and followers reducing computational load as each follower solves its own local optimization problem to minimize the difference between its current state and the desired position relative to the leader [14]; Voronoi fast marching scheme which combines the advantages of Voronoi diagrams (safety) with the computational efficiency of the fast marching method and with this scheme a safe path for the leader is computed while the followers adjust their positions according to the leader maintaining a prescribed separation [15]; tacit navigation methods which rely on local relative sensor data, rather than global data, to infer the leader’s path [16]; genetic algorithms applied to optimize the multi-level decision-making in leader–follower schemes, where as in the predictive techniques the leader maximizes their objective while anticipating the optimal response of the followers [17]; or the A* algorithm where the leader uses the A* to calculate the optimal route, while the followers track the leader’s position using local controllers (typically artificial potential fields), thus combining a global path planning with local tracking [18,19,20], all of which are used in path planning and formation control for multi-agent systems.
In multi-agent systems, the leader–follower scheme is widely used with various approaches like the Virtual Train Model [21], the Fast Marching algorithm [15], or tracking algorithms [22]. These methods aim to address common issues in the leader–follower scheme, such as trajectory tracking error accumulation when the distance between the leader and follower is large or when the leader makes sharp directional changes. Another important aspect of the leader–follower scheme is tracking the leader’s pose, which is usually achieved through two main approaches: visual measurements and odometry [23].
This work proposes a dual approach to the A* algorithm for the leader–follower scheme; the main goal is to develop a robust algorithm to generate follower trajectories based solely on the leader’s linear acceleration (Figure 1). Unlike many applications based on the A* algorithm that aim to plan the trajectory of a single robot by minimizing distances [24,25,26,27,28,29], this work introduces a leader–follower scheme that uses the eight-possibility star and measures the leader’s acceleration to determine the path the follower should take.
The algorithm’s robustness is sought about the initial and relative pose of the leader regarding the followers, so that the leader can be placed in any pose without needing a fixed frame of reference. The leader’s pose is tracked by measuring its acceleration with an inertial sensor and transmitting it to the followers within a finite set of possibilities, and the followers around it can replay its trajectory, velocity, and acceleration. Animals inspire this idea in flocks, litters, swarms, anthills, or packs, where a leader establishes the group’s direction and speed (Figure 2).
While the conventional A* algorithm aims to minimize the cost of finding the best path for establishing a trajectory by minimizing distances, as shown in [30] (which uses a dynamic window for multi-robot path planning), the proposed dual approach to the A* algorithm, although decision-making also involves choosing among eight options or cells, the goal is not to minimize distance; instead, the focus is on analyzing the direction of acceleration. Moreover, this modified A* algorithm is not used to plan a trajectory to avoid obstacles; rather, it is employed to plan a follower trajectory based on the leader’s acceleration.
Another comparison that could easily arise with this proposal is with the Bellman–Ford and Dijkstra algorithms [31], whose objective is to find the shortest path from a single origin; however, this system differs from these algorithms in that it does not seek the shortest path by minimizing distance. The objective is to determine the direction of acceleration to infer the leader’s movement, with the added advantage that the leader can be at any position, since the system does not require a specific leader position to plan the follower trajectory.
Another element with which it can be compared is Breadth First Search (BFS), a graph traversal algorithm that has proven more suitable for parallel processing [32,33]. The BFS algorithm involves searching within a pre-established tree, set of nodes, or graph. In this case, this work is distinguished by the fact that the graph being traversed always has the same configuration; that is, there is only one configuration of eight possibilities, and the selection is made from that configuration each time.
The main advantage of the proposed algorithm is that it does not require a fixed orientation between the leader and the follower, which provides several benefits. The first is operational flexibility, which allows any robot in the group to act as the leader in its situation—that is, the one with the best position and greater autonomy. It also makes reconfiguring formations easy without the need to program complex routes. This is useful in industrial settings where it is necessary to prioritize loads based on position and exchange leadership based on the element with the best visibility, angle, or proximity to the goal position. Relying on inertial sensors reduces the need for infrastructure like GPS or markers for absolute positioning. Overall, this algorithm offers greater flexibility and lower operating costs for mobile or collaborative fleets, being especially beneficial in dynamic environments.

2. The Mathematical Model

A* algorithm is a search algorithm defined on a finite graph taking the form f n = g n + h ( n ) , where g(n) is the cost of the path from the node labeled with zero up to the last node labeled with n, and h(n) is a heuristic function that estimates the minimum cost path from node n to the goal.
Although A* algorithm is well-known and has been successfully applied in several path planning scenarios, it is still under investigation, in search of speed and optimality in its execution. In [19], A* algorithm and its modifications are evaluated for stand-alone mobile robots in specific scenarios, focusing on computational time and path optimality. The performance of a heuristic approach to the eight-star algorithm for a stand-alone mobile robot is evaluated in [20] with a focus on path planning cost. Another way to improve the efficiency of the eight-star method is by means of image processing techniques as shown in [34] or by the jump search method and pruning as shown in [35].
Here a dual approach to the A* algorithm is proposed, with the objective to generate consistent trajectories for a leader–follower scheme based only on the acceleration vectors of the leader’s trajectory. The operation of the algorithm is as follows.
As usual, consider the canonical unit vectors.
i = 1 0   a n d   j = 0 1
Let us consider a particle moving on the plane following a path parameterized by a curve r t = x t i + y t j , where a t b . Assume x t and y t have continuous derivatives up to the second order on a < t < b . Let us consider the following situation: We know only a finite set of accelerations of the particle. As a result, the particle’s path can be estimated by using a polygonal in such a way that we can assume the particle is moving with constant accelerations on each line segment. To fix ideas, suppose that an IMU is placed on the particle, and the accelerations are recorded for each unit of time t k for each nonnegative integer k . As a result, in the future, we will consider time to be discrete, and we can replace the k t h instant t k simply by k . Let a k = a k , x i + a k y j be the acceleration obtained by an IMU at time k , then let a 1 , a 2 , , a n be the acceleration data from an IMU. Set the initial velocity as
V 0 = v 0 , x i + v 0 , y j
and set the velocity at time k as
V k = v k , x i + v k , y j
Let us estimate the velocity at the instant k assuming that the particle has constant acceleration between k 1 and k . Hence, the rectangular coordinates of velocity at time k are given recursively by the equations
v k , x = v k 1 , x + a k , x t v k , y = v k 1 , y + a k , y t ,   k = 0 , 1 , , n .
We shall also consider the magnitudes of velocity and acceleration; thus, we set
v k = V k = v k , x 2 + v k , y 2
a k = a k = a k , x 2 + a k , y 2
With i and j , we define our reference unit vectors as:
e 0 = i
e 1 = 2 2 i + j ,
e 2 = j ,
e 3 = 2 2 j i ,
e 4 = i ,
e 5 = 2 2 i + j ,
e 6 = j ,
e 7 = 2 2 i j .
Such vectors can be visualized as Figure 3 shows:
Now, define the real number m k as
m k = max   V k · e k |   k = 0 , 1 , , 7
The number m k measures the greatest component of V k into the reference unit vectors; hence, m k chooses the closest direction among all the reference unit vectors to V k .
To effectively construct a displacement, we must introduce a control coefficient c k j defined as
c k j = 0 ,   if   V k · e k < m k 1 ,   if   V k · e k = m k
In such manner, we define the displacement at time k as
r k = j = 0 7 c k j V k · e j e j
Now, we can define recursively the positions of the particle on the path as follows. First, set
P 0 = 0 0
Hence, if P k is defined, then set
P k + 1 = P k + r k
We assert that the proposed algorithm in this work is a dual approach to the A* algorithm. To prove it, first define:
ε = e i i = 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7
Each estimated path with n nodes is obtained, selecting n elements of ε . Hence, the space of all possible paths with n nodes is the n -Cartesian product ε n . That is,
ε n = ε 1 , ε 2 , . , ε n ε i ε , i = 0 , 1 , 2 , , n
We define the cost to select ε k once we estimate v k as
c k = v k · ε k
The previous equation permits us to define the total cost function u : ε n R by
u γ = k = 1 n c k
for each γ = ε 1 , ε 2 , . , ε n in ε n . Recall that the proposed algorithm requires us to calculate:
m k = m a x v k · e i | i = 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ,         k = 0 , 1 , 2 , , n
Each m k implies the existence of a unique n k ε such that m k = v k · ε k . Thus, the sequence m 0 , m 1 , , m n defines a path γ # = n 1 , n 2 , , n n . We claim that u achieves its minimum value at γ # . In fact, let γ = ε 1 , ε 2 , . , ε n be an arbitrary path, it follows by the definition of m k that:
m k v k · ε k
from which we obtain that
u γ # = k = 1 n m k k = 1 n c k = u γ
Inequality (23) proves the claim that the proposed algorithm is a dual model of the A* algorithm.

3. Test Patterns Simulations

To test the algorithm under different conditions, staggering the degree of complexity, it starts with simple geometry trajectories of a single pattern and later with more complex patterns, such as words. The first proposed geometry is a pinwheel shape:
This figure was generated using Matlab® 2025 software by means of a time vector and its corresponding Equations (25) and (26) for the x and y point pairs; 2000 intermediate values were used.
x t = c o s t + c o s t 2 ,   0 , 2 π
y t = sin t sin t 2 ,   0 , 2 π  
From these expressions, the trajectory shown in Figure 4a is derived. Once the pattern to follow is established, the second derivative with respect to time of these expressions is calculated to obtain only the acceleration components, Equations (27) and (28), simulating the linear acceleration measurement of an Inertial Measurement Unit, which results in:
a x t = cos t 1 4 c o s t 2 ,   0 , 2 π
a y t = sin t 1 4 s i n t 2 ,   0 , 2 π
This second derivative is normalized using a maximum function, and then Algorithm 1 from Section 3 is executed:
Algorithm 1 A* Dual Approach
Basis vectors
 i = [1; 0]
 j = [0; 1]
 e0 = i
 e1 = (sqrt(2)/2)(i + j)
 e2 = j
 e3 = (sqrt(2)/2)(j − i)
 e4 = −i
 e5 = −(sqrt(2)/2)(i + j)
 e6 = −j
 e7 = (sqrt(2)/2)(i − j)
Initialize the Array
 Point = matrixlength (length(ax), 8)
 mx = vectorlength(ax)
 r = vectorlength(ax)
For k since 1:length(ax)
 v = [ax(1,k); ay(1,k)]
 Point(k,1) = dot(v, e0)
 Point(k,2) = dot(v, e1)
 Point(k,3) = dot(v, e2)
 Point(k,4) = dot(v, e3)
 Point(k,5) = dot(v, e4)
 Point(k,6) = dot(v, e5)
 Point(k,7) = dot(v, e6)
 Point(k,8) = dot(v, e7)
 mx(k) = max(k,:)
 r(k) = indicates where Point(k,:) == mx(k)
End
Initialize P as matrix 2 × length(A) with zeros
l = 0
For o since 2 to length(r):
 l = l + 1
 Select for r(l):
  case 1:
   P(:, o) = P(:, o − 1) + mx(o − 1) * e0
  case 2:
   P(:, o) = P(:, o − 1) + mx(o − 1) * e1
  case 3:
   P(:, o) = P(:, o − 1) + mx(o − 1) * e2
  case 4:
   P(:, o) = P(:, o − 1) + mx(o − 1) * e3
  case 5:
   P(:, o) = P(:, o − 1) + mx(o − 1) * e4
  case 6:
   P(:, o) = P(:, o − 1) + mx(o − 1) * e5
  case 7:
   P(:, o) = P(:, o − 1) + mx(o − 1) * e6
  case 8:
   P(:, o) = P(:, o − 1) + mx(o − 1) * e7
End
Normalize P
 P(1, :) = P(1, :) / maximum(abs(P(1, :)))
 P(2, :) = P(2, :) / maximum(abs(P(2, :)))
Plot
Figure 4a,b shows the reconstructed pattern using the algorithm for vector P. The reconstruction of this pattern demonstrates the algorithm’s ability to create curved trajectories that coincide at a central point. Observe that the pattern in Figure 4 has the same morphology in its three helices. However, during reconstruction, the trajectory’s direction is estimated based on the orientation of the defined unit vectors. All figures were normalized to remove units; the normalization value was selected for each figure to make the morphology as stylized as possible, clearly highlighting the differences or similarities between the trajectory and the route.
The second pattern is a spiral (Figure 5a) where the curvature gradually widens. This figure was generated using Matlab® software by means of a time vector and its corresponding Equations (29) and (30) for the x and y point pairs; 1000 intermediate values were used. In this example, the algorithm can reconstruct the trajectory (Figure 5b) with greater fidelity, the more closed the curve is. Observe that the fidelity of the reconstruction decreases when the radius of curvature increases; this is because the acceleration, Equations (31) and (32), in the plane of motion is more constant to the acceleration of a more closed curvature; when the acceleration has fewer changes, the estimate looks more like a straight line.
x t = sin t cos 12 t ,   0 ,   1 2 π  
y t = sin t sin 12 t ,   0 ,   1 2 π  
a x t = 24 sin 12 t cos t 145 sin t c o s ( 12 t ) ,   0 ,   1 2 π  
a y t = 24 cos 12 t cos t 145 sin t s i n ( 12 t ) ,   0 ,   1 2 π  
The third pattern is a trajectory with less curvature (Figure 6a) to observe the reconstruction in areas that have more linear trajectories (Figure 6b). This figure was generated using MATLAB software from a time vector and the corresponding Equations (33) and (34) for the x and y point pairs; 500 intermediate values were used.
The reconstruction trajectory is a set of straight lines with much more abrupt changes for curves whose morphology is similar to a tracked trajectory. Still, it is more convenient to facilitate the control of the follower over the leader when using simple configurations such as the differential.
x t = 4 sin 2 t cos t ,   0.8 π ,   0.3 π  
y t = cos t + 3 s i n ( t ) , 0.8 π ,   0.3 π  
a x t = 20 sin 2 t cos t 16 sin t c o s ( 2 t ) ,   0.8 π ,   0.3 π    
a y t = cos t 3 sin t , 0.8 π ,   0.3 π  
Subsequently, a more complex pattern (Figure 7a) was worked on when rebuilding a line (Figure 7b) with many twists and turns. This pattern was created as follows: the word love was plotted on graph paper, and the x and y coordinates were recorded. Then, this vector was differentiated twice by calculating the differences between adjacent values twice. Using the points from the difference calculation, the A* dual approach from Section 3 was applied, resulting in the patterns shown in Figure 7. We developed this test to push the algorithm to its limits, creating a pattern with curvatures and connections resembling cursive writing and exploring applications such as handwriting. In this composite figure, observe that in the case of simple curvatures such as the letter l and the letter v, the reconstruction of the algorithm is accurate, sticking more faithfully to the original stroke, while in the case of the vowels e and o, crossing the exact points of coincidence where the trajectory overlaps and there are abrupt changes, the reconstruction moves away from the original path.
It is important to note that this algorithm is based on the eight-way star diagram, similar to the traditional A* algorithm. However, they are not directly comparable because the star diagram is not used for optimal route planning but to approximate the leader’s trajectory based solely on its linear acceleration. The original A* algorithm relies on knowing the initial position, which is unavailable here because the focus is solely on linear acceleration. This simplifies the sensing system by eliminating the need-to-know details of the propulsion system, such as tires or tracks.
Another observable element is that the complexity of the tests increased gradually; in the first test, 2000 samples were used, followed by 1000 samples in the second, 500 in the third, and finally, a unit time increment was applied. This demonstrates the algorithm’s ability to adapt to different sampling scenarios and varied intervals.
The main advantage of this algorithm is that it reduces measurement interference at the leader because it does not depend on the relative position between the leader and the follower; in other words, the leader does not need to be in front of the follower. Another benefit is that it is unaffected by wheel or track slippage, as it requires only knowledge of the movement’s acceleration, not its position.

4. Experimental Patterns

Once the algorithm had been tested against theoretical patterns, it was tested with two experiments. The first experiment involved an autonomous car with a pre-loaded trajectory, acting as a leader. Its linear acceleration data was collected and then sent to the reconstruction algorithm to get the original trajectory. The second experiment consisted of a leader with a completely random route; in this case, a person walking acted as the leader and carried an accelerometer. The follower was a vehicle with an Ackerman configuration that determined its route based on the tracking algorithm’s results from the mathematical model in Section 3. The experiments were performed at a sampling frequency of 10 Hz and over a 2 G range. In the first experiment, the car moved on a ceramic floor, and in the second experiment, it was performed on a cement slab of a basketball court.
The first experiment is the vehicle with a differential configuration shown in Figure 8a with a preloaded trajectory (Figure 8b). The vehicle’s purpose is to travel the marked trajectory. The vehicle’s electronic system comprises an MPU5060 sensor to measure linear acceleration, an ESP32 card as the master to read accelerometer data, a battery voltage regulator, and controller cards for the motors. The vehicle’s route begins at the start marker in Figure 8b and ends at the finish marker in the same figure. The vehicle’s direction of movement is as indicated by the path in Figure 8b. This vehicle is programmed to follow the path of the red line in Figure 8b. With the linear acceleration sensor (MPU6050) placed at the top, the linear acceleration of the leader, in this case, the vehicle, is sensed, and the data is sent to a computer that has the task of reconstructing the vehicle’s route; the result of the reconstruction using the mathematical model of Section 3 is shown in Figure 9.
Note that the vehicle’s movement is entirely autonomous. That is, this vehicle is a leader. The reconstructed trajectory is that of Figure 9; said trajectory is the one that the followers should reproduce. Observe that the initial curvature of the starting point (Zone A, Figure 8b) and the last pronounced curve (Zone B, Figure 8b) are similar in concavity to the intermediate part of the trajectory, and the reconstruction (Figure 9) traces a trajectory of similar morphology. In contrast, the straight areas of the trajectory are reconstructed with the same trend.
A second leader–follower system was created where a leader is a person who walks wearing an accelerometer (Figure 10), and the follower is a vehicle with an Ackerman configuration that reproduces the leader’s trajectory in real time. (Figure 11). Real-time monitoring is seen on video here. https://drive.google.com/drive/folders/1Taylq-uJEW9dPRON6sy6upouwaKS8pwX?usp=share_link, accessed on 31 March 2026.
In this second experiment, it was observed that the follower’s direction is easier to control in the Ackerman configuration because the follower’s radius of gyration does not allow trajectory changes to be as abrupt as in a differential configuration. So, the probability of establishing a course using only the top of the star is higher. In this experiment, it is notable that the person can walk to the right, left, and even behind the follower, and the follower can follow the leader’s path.
The evaluation of trajectory consistency in experimental tests still needs to be done from a spatial location perspective, as only the leader’s acceleration is currently measured. This is because the work occurs in an open, uncontrolled environment without a predefined map, such as the grid mapping used in the conventional A* algorithm. This is a current limitation of the experimental setup.
The experiment is set up in a scenario where the leader is either a remotely controlled mobile robot or a person guiding follower robots. In this setup, the leader’s exact spatial position is unknown; only its acceleration is measured. Based solely on this measured acceleration, the followers are instructed to imitate the leader’s path.

5. Deviation Between the Leader’s and Follower’s Routes

To calculate the deviation between the leader’s trajectory and the follower’s trajectory, the deviation was calculated by 37 and 38:
σ x = 1 N i = 1 N x i x i * 2
σ y = 1 N i = 1 N y i y i * 2
x i , y i are the ideal i t h coodinates, while x i * , y i * are the coordinates the algorithm estimated, and N is the number of samples. While σ x is the deviation on the x   a x e s and σ y is the deviation on the y   a x e s .
As shown in Table 1, a significant error is observed in x in the case of the pinwheel. This occurs because, near the intersection of the three wings, the curves tend to become straight lines with slopes 0/0.5. In this figure, the algorithm is unable to reproduce the smoothness of the stroke at the triple intersection. However, what truly causes the deviation in the x-axis to increase by up to two orders of magnitude compared to the y-axis is that, in the left part of the figure where the pinwheel’s petal is longer, the algorithm assumes the same acceleration direction along nearly the entire length of the petal, completely ignoring the upper and lower curvature, which causes the error to skyrocket. In the case of the spiral, the algorithm’s behavior improves significantly; the error is lower than for the other figures on both axes. This is because the radius of curvature increases and changes direction closer to the star. For the open trajectory pattern, the problem occurs around the most extended trajectory, where a change in slope is almost invisible to the eye, since the algorithm approximates it in two sections that differ significantly. Note that both for the open path in its longest section and for the pinwheel in its longest petal, where the algorithm approximates a shallow curve with the same straight line, the deviation between the paths skyrockets, revealing a limiting element of the algorithm. In the case of the pattern of the word love, a similar error is observed at the pinwheel; in the area where the points intersect to form the letter l, the approximation fails and causes the error to be more significant. This helps us identify two limiting factors of the algorithm: when a curve overlaps itself and when the curve has low curvature, approaching a straight line.

6. Discussion

The algorithm can generate consistent trajectories in real time without requiring the leader and follower to be coincident in orientation, and it is not necessary for the leader to always be in front of the follower or the cluster of followers, since the algorithm is invariant to this characteristic.
This algorithm is for cases in which the leader has extremely random trajectories, and the field of movement is vast due to its wide operational versatility, since it does not depend on environmental variables such as lighting or on systems of perception to locate the leader. For example, a reconstruction consistent with the spiral pattern is observed, which has a gradually increasing change in curvature, as seen in Figure 12.
It would be possible to identify each letter or stroke by measuring deviations. If it is possible to estimate a normal distribution, it would likely be possible to correct the algorithm to predict the trace based on the first k-traces. In the future, an algorithm could be proposed to identify and predict the user’s stroke.
Limitations were observed in the algorithm, such as when a route overlaps itself; the algorithm has difficulty reconstructing it, and the reconstructed path results in a displacement, as shown in Figure 13 and Figure 14. This also explains the greater deviation in the results of Table 1.
Following initial theoretical tests, the reconstruction algorithm was validated in two practical leader–follower scenarios. In the differential vehicle experiment, the reconstructed trajectories retained the main morphological features of the primary path: the concavities in the curved zones A and B, and the straight segments maintained their trend. This shows that the mathematical model accurately captures the overall shape of the trajectory from linear acceleration data at 10 Hz/±2 g under consistent motion conditions and with low noise.
The experiment with a human-guided vehicle demonstrated its real-time applicability and robustness to the most variable and unrestricted leader movements, including lateral movements and even those behind the follower.
The quantitative errors expose the systematic limitations of the algorithm. The significant deviations along the x-axis of the spiral pattern and the failures at self-intersections—for example, the pattern center and the letter “l” in the word pattern—highlight that the model struggles when the curvature changes rapidly or when overlapping trajectories produce ambiguous acceleration signals. Likewise, long, shallow curves are approximated as straight segments, leading to large deviations when small slope changes are not captured at the given resolution. The relatively low error in the spiral pattern indicates that performance improves when the curvature changes more gradually and smoothly.
The preservation of the overall trajectory morphology, real-time viability at 10 Hz, and practical operability with both mechanical and human guides are key advantages. Limitations include sensitivity to low-curvature segments when they are nearly straight, an inability to resolve overlapping or self-intersecting curves, and observed anisotropic errors, suggesting that the model’s assumptions about acceleration direction and segmentation introduce bias.
This proposal has some limitations, both theoretical and practical. Theoretically, when the leader follows a trajectory overlaid on itself, the follower can do the same; however, the crossing point is delayed or advanced depending on the acceleration curvature of the original trajectory, as shown in Figure 13, where the trajectory crossings are shifted. In practice, it is observed that when the follower has a large turning radius, the leader must move at low speeds to maintain tracking; otherwise, the follower cannot reproduce the leader’s sudden changes in direction. On another note, the main advantage of this approach is that it does not require knowledge of the leader’s exact trajectory; only its linear acceleration is needed. This provides a significant benefit in cases of wheel slippage or when machine vision cannot be used due to environmental conditions and limited power.

7. Conclusions

This work aims to demonstrate that a dual approach to the A* algorithm can generate a trajectory with sufficient fidelity to the leader for the followers.
The algorithm creates a trajectory described by the superposition of unit vectors. Because trajectories are standardized, teleoperated controls for assistive robotics, online writing applications, collaborative robotics, etc., can be implemented. One element that affects the algorithm’s performance is the friction that the vehicles present with the ground since these distance their natural behavior from the mathematical model. Another factor that contributes to increasing the deviation between the real curve and the ideal one is the different nature of the systems that reproduce it; for example, for the perfect traces generated in simulation, a clearer closeness is observed between the two curves, while when the trajectory is carried out with the vehicle, various factors influence the phenomenon. For example, the speed at which the car moves versus the sampling speed of its acceleration is relevant; another important factor is the turning radius of the following vehicle, since although it is observed in the example of the person and the car with Ackerman steering to be successful, it is necessary to measure the speed at which one walks concerning the reaction capacity of the following vehicle.
The reconstruction algorithm effectively recovers the main shape of the leader’s trajectories from linear acceleration measurements taken at 10 Hz/±2 g, making it suitable for real-time leader–follower applications with both robotic and human leaders.
Ackerman-configured trackers provide better controllability and smoother tracking than differential trackers. However, the movement must be slower and more steady for the Ackerman configuration to trace curves, as the turning radius is considerably larger.
The primary failure modes include overlapping trajectories, in which acceleration signals become ambiguous, and long, low-curvature segments, in which the algorithm approximates smooth curves with straight lines, leading to significant positional errors. To enhance accuracy, future work should focus on increasing temporal and spatial resolution or implementing multisensory fusion, such as adding a gyroscope, magnetometer, or visual odometry. Incorporating curvature-sensitive segmentation or adaptive modeling can also help better manage smooth and rapidly changing curvatures, while developing disambiguation strategies for intersecting trajectories—such as using prior map or context information or additional sensors—is advisable. With these enhancements, the method demonstrates clear potential for low-cost, real-time trajectory transmission and follower control in robotics and human–robot interaction environments.

Author Contributions

Conceptualization, G.S.A.-J. and M.V.V.-B.; Methodology, G.S.A.-J. and M.V.V.-B.; validation, J.M.-C.; formal analysis, G.S.A.-J. and M.V.V.-B.; investigation, Y.L.-G.; resources, Y.L.-G.; data curation, G.S.A.-J. and J.M.-C.; writing—original draft preparation, G.S.A.-J. and M.V.V.-B.; writing—review and editing, J.M.-C.; visualization, Y.L.-G.; supervision, J.M.-C. and J.C.-C.; project administration, G.S.A.-J.; funding acquisition, M.V.V.-B. and J.C.-C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Secretaría de Investigación and Posgrado del Instituto Politécnico Nacional, projects SIP20253567, SIP20254472, SIP20254020, SIP20254415.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Acknowledgments

The authors are grateful for the financial support from the Secretaría de Investigación y Posgrado del Instituto Politécnico Nacional.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Zhang, X.; Pham, Q.C. Planning coordinated motions for tethered planar mobile robots. Rob. Auton. Syst. 2019, 118, 189–203. [Google Scholar] [CrossRef]
  2. Cheng, Y.S.; Yen, S.H.; Bedaka, A.K.; Shah, S.H.; Lin, C.Y. Trajectory planning method with grinding compensation strategy for robotic propeller blade sharpening application. J. Manuf. Process. 2023, 86, 294–310. [Google Scholar] [CrossRef]
  3. Li, R.; Ding, N.; Zhao, Y.; Liu, H. Real-time trajectory position error compensation technology of industrial robot. Measurement 2023, 208, 112418. [Google Scholar] [CrossRef]
  4. Cai, W.; Liu, M.; Zhang, M.; Wang, C. Cooperative Artificial Intelligence for underwater robotic swarm. Robot. Auton. Syst. 2023, 164, 104410. [Google Scholar] [CrossRef]
  5. Chella, A.; Gaglio, S.; Mannone, M.; Pilato, G.; Seidita, V.; Vella, F.; Zammuto, S. Quantum planning for swarm robotics. Robot. Auton. Syst. 2023, 161, 104362. [Google Scholar] [CrossRef]
  6. Wei, P.; Yu, X.; Di, Z.; Dai, X.; Wang, B.; Zeng, Y. Design of Robot Automatic Navigation under Computer Intelligent Algorithm and Machine Vision. J. Ind. Inf. Integr. 2022, 28, 100366. [Google Scholar] [CrossRef]
  7. Quan, Y.; Wang, Z. Formation control: A review and a new consideration. In Proceedings of the 2005 IEEE/RSJ International Conference on Intelligent Robots and Systems, Edmonton, AB, Canada, 2–6 August 2005. [Google Scholar] [CrossRef]
  8. Hadi, B.; Khosravi, A.; Sarhadi, P. A Review of the Path Planning and Formation Control for Multiple Autonomous Underwater Vehicles. J. Intell. Robot. Syst. 2021, 101, 67. [Google Scholar] [CrossRef]
  9. Oh, K.-K.; Park, M.-C.; Ahn, H.-S. A survey of multi-agent formation control. Automatica 2015, 53, 424–440. [Google Scholar] [CrossRef]
  10. Wang, X.; Yang, H.; Chen, H.; Wang, J.; Bai, L.; Zan, W. Leader-Follower Formation Control Based on Artificial Potential Field and Sliding Mode Control. In Intelligent Robotics and Applications; Springer: Cham, Switzerland, 2017; pp. 203–214. [Google Scholar] [CrossRef]
  11. Lagunas-Avila, J.; Castro-Linares, R.; Alvarez-Gallegos, J. Obstacle avoidance in leader-follower formation using artificial potential field algorithm. In Proceedings of the 2021 18th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE), Mexico City, Mexico, 10–12 November 2021. [Google Scholar] [CrossRef]
  12. Gu, D. A Differential Game Approach to Formation Control. IEEE Trans. Control. Syst. Technol. 2008, 16, 85–93. [Google Scholar] [CrossRef]
  13. Lin, Z.; Wang, L.; Han, Z.; Fu, M. Distributed Formation Control of Multi-Agent Systems Using Complex Laplacian. IEEE Trans. Automat. Contr. 2014, 59, 1765–1777. [Google Scholar] [CrossRef]
  14. Bujarbaruah, M.; Sturz, Y.R.; Holda, C.; Johansson, K.H.; Borrelli, F. Learning Environment Constraints in Collaborative Robotics: A Decentralized Leader-Follower Approach. In Proceedings of the 2021 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Prague, Czech Republic, 27 September–1 October 2021. [Google Scholar] [CrossRef]
  15. Garrido, S.; Moreno, L.; Gómez, J.V.; Lima, P.U. General path planning methodology for leader-follower robot formations. Int. J. Adv. Robot. Syst. 2013, 10. [Google Scholar] [CrossRef]
  16. Kim, J.W.; Kim, Y.H.; Min, B.C.; Kim, D.H. Tacit Navigation Method for Multi-agent System. In Trends in Intelligent Robotics. 2010. Communications in Computer and Information Science; Springer: Berlin/Heidelberg, Germany, 2010. [Google Scholar] [CrossRef]
  17. Sun, S.; Morris, A.S.; Zalzala, A.M.S. Trajectory planning of multiple coordinating robots using genetic algorithms. Robotica 1996, 14, 227–234. [Google Scholar] [CrossRef]
  18. Batik Garip, Z.; Karayel, D.; Ozkan, S.S.; Atali, G. Path planning for multiple mobile robots using A∗ algorithm. Acta Phys. Pol. A 2017, 132, 685–688. [Google Scholar] [CrossRef]
  19. Duchoň, F.; Babinec, A.; Kajan, M.; Beňo, P.; Florek, M.; Fico, T.; Jurišica, L. Path planning with modified A star algorithm for a mobile robot. Procedia Eng. 2014, 96, 59–69. [Google Scholar] [CrossRef]
  20. Bhadoria, A.; Singh, R.K. Optimized Angular a Star Algorithm for Global Path Search Based on Neighbor Node Evaluation. Int. J. Intell. Syst. Appl. 2014, 6, 8. [Google Scholar] [CrossRef][Green Version]
  21. Shan, M.; Zou, Y.; Guan, M.; Wen, C.; Ng, C.-L. A leader-following approach based on probabilistic trajectory estimation and virtual train model. In Proceedings of the 2017 IEEE 20th International Conference on Intelligent Transportation Systems (ITSC), Yokohama, Japan, 16–19 October 2017. [Google Scholar] [CrossRef]
  22. Madhevan, B.; Sreekumar, M. Tracking algorithm using leader follower approach for multi robots. Procedia Eng. 2013, 64, 1426–1435. [Google Scholar] [CrossRef][Green Version]
  23. Zou, Y.; Shan, M.; Guan, M.; Wen, C.; Lim, K.Y. A trajectory reconstruction approach for leader-following of multi-robot system. In Proceedings of the 2017 12th IEEE Conference on Industrial Electronics and Applications, ICIEA 2017, Siem Reap, Cambodia, 18–20 June 2017. [Google Scholar] [CrossRef]
  24. Kastanya, D. A preliminary study to evaluate the potencial utilization of the A* search algorithm in radioactive waste storage arrangement. Ann. Nucl. Energy 2022, 175, 109219. [Google Scholar] [CrossRef]
  25. Foead, D.; Ghifari, A.; Kusuma, M.B.; Hanafiah, N.; Gunawan, E. A Systematic Literature Review of A* Pathfinding. Procedia Comput. Sci. 2021, 179, 507–514. [Google Scholar] [CrossRef]
  26. Nelson, L.M.; Nihat, I.; Mustafa, Y.E. Control of mobile robot formations using A-star algorithm and artificial potencial fields. J. Mechatron. Electr. Power Veh. Technol. 2021, 12, 57–67. [Google Scholar] [CrossRef]
  27. Kabir, R.; Watanobe, Y.; Islam, M.R.; Naruse, K. Enhanced Robot Motion Block of A-Star Algorithm for Robotic Path Planning. Sensors 2024, 24, 1422. [Google Scholar] [CrossRef] [PubMed]
  28. Daohong, L. Research of the Path Finding Algorithm A* in Video Games. Highlights Sci. Eng. Technol. 2023, 39, 763–768. [Google Scholar] [CrossRef]
  29. Chatzisavvas, A.; Louta, M.; Dasygenis, M. Enhancing the A* Algorithm for Efficient Route Planning of Agriculture. In Proceedings of the 18th International Workshop on Cellular Nanoscale Networks and their Applications 2023, Xanthi, Greece, 28–30 September 2023. [Google Scholar]
  30. Yong, H.; Chagyong, L.; Zhaohui, A. Based on the Integration of the Improve A* Algorithm with the Dynamic Window Approach for Multi-Robot Path Planning. Planning. Appl. Sci. 2025, 15, 406. [Google Scholar] [CrossRef]
  31. Alamoudi, O.; Al-Hashimi, M. On the Energy Behaviors of the Bellman–Ford and Dijkstra Algorithms: A Detailed Empirical Study. J. Sens. Actuator Netw. 2024, 13, 67. [Google Scholar] [CrossRef]
  32. Cuzzocrea, A.; Colulschi, M.; De Virgilio, R. An effective and Efficient MapReduce Algorithm for Computing BFS-Based Traversals of Large-Scale RDF Graphs. Algorithms 2016, 9, 7. [Google Scholar] [CrossRef]
  33. Sousa, M.; Carvalho, A.M. Polynomial-Time Algorithm for Learning Optimal BFS-Consistent Dynamic Bayesian Networks. Entropy 2018, 20, 274. [Google Scholar] [CrossRef]
  34. Dirik, M.; Fatih Kocamaz, A. Global Vision Based Path Planning for AVGs Using A* Algorithm. Available online: www.dergipark.org.tr/en/pub/jscai (accessed on 2 December 2025).
  35. Huang, H.; Li, Y.; Bai, Q. An improved star algorithm for wheeled robots path planning with jump points search and pruning method. Complex Eng. Syst. 2022, 2, 11. [Google Scholar] [CrossRef]
Figure 1. The leader and the followers, where the leader sets the direction, speed, and acceleration of the movement.
Figure 1. The leader and the followers, where the leader sets the direction, speed, and acceleration of the movement.
Asi 09 00078 g001
Figure 2. Shoal with a leader and his followers.
Figure 2. Shoal with a leader and his followers.
Asi 09 00078 g002
Figure 3. Reference unit vectors e k from k = 0 to k = 7 .
Figure 3. Reference unit vectors e k from k = 0 to k = 7 .
Asi 09 00078 g003
Figure 4. Pinwheel Shape: (a) Ideal case; (b) Pattern generated through A* dual approach.
Figure 4. Pinwheel Shape: (a) Ideal case; (b) Pattern generated through A* dual approach.
Asi 09 00078 g004
Figure 5. Spiral shape: (a) ideal case; (b) pattern generated through A* dual approach.
Figure 5. Spiral shape: (a) ideal case; (b) pattern generated through A* dual approach.
Asi 09 00078 g005
Figure 6. Open trajectory: (a) ideal case; (b) pattern generated through A* dual approach.
Figure 6. Open trajectory: (a) ideal case; (b) pattern generated through A* dual approach.
Asi 09 00078 g006
Figure 7. Love pattern: (a) ideal case; (b) pattern generated through A* dual approach.
Figure 7. Love pattern: (a) ideal case; (b) pattern generated through A* dual approach.
Asi 09 00078 g007
Figure 8. Verification of the algorithm in a vehicle: (a) Autonomous vehicle with a differential configuration controlled through a PWM and an ESP32 card.; (b) Open trajectory for experimental testing of the algorithm.
Figure 8. Verification of the algorithm in a vehicle: (a) Autonomous vehicle with a differential configuration controlled through a PWM and an ESP32 card.; (b) Open trajectory for experimental testing of the algorithm.
Asi 09 00078 g008
Figure 9. Open trajectory for experimental testing of the algorithm.
Figure 9. Open trajectory for experimental testing of the algorithm.
Asi 09 00078 g009
Figure 10. Leader–follower system with Ackerman configuration.
Figure 10. Leader–follower system with Ackerman configuration.
Asi 09 00078 g010
Figure 11. A person who walks with an accelerometer and an Ackerman configuration reproduces the leader’s trajectory in real time.
Figure 11. A person who walks with an accelerometer and an Ackerman configuration reproduces the leader’s trajectory in real time.
Asi 09 00078 g011
Figure 12. Overlapping spiral, original route, and reconstructed route with A* dual approach.
Figure 12. Overlapping spiral, original route, and reconstructed route with A* dual approach.
Asi 09 00078 g012
Figure 13. Overlapping pinwheel, original route, and reconstructed route with A* dual approach.
Figure 13. Overlapping pinwheel, original route, and reconstructed route with A* dual approach.
Asi 09 00078 g013
Figure 14. Overlapping “love” pattern, original route, and reconstructed route with A* dual approach.
Figure 14. Overlapping “love” pattern, original route, and reconstructed route with A* dual approach.
Asi 09 00078 g014
Table 1. Calculation of error for each pattern.
Table 1. Calculation of error for each pattern.
Pattern σ x σ y
Pinwheel (Figure 4)8.41740.7068
Spiral (Figure 5)0.02760.0686
Open trajectory (Figure 6)0.07062.1056
Love pattern (Figure 7)0.13710.8402
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Abarca-Jiménez, G.S.; Vega-Blanco, M.V.; Mares-Carreño, J.; Cruz-Castro, J.; López-Grijalba, Y. A Dual Approach to the A* Algorithm to Generate Consistent Trajectories for the Leader–Follower Scheme. Appl. Syst. Innov. 2026, 9, 78. https://doi.org/10.3390/asi9040078

AMA Style

Abarca-Jiménez GS, Vega-Blanco MV, Mares-Carreño J, Cruz-Castro J, López-Grijalba Y. A Dual Approach to the A* Algorithm to Generate Consistent Trajectories for the Leader–Follower Scheme. Applied System Innovation. 2026; 9(4):78. https://doi.org/10.3390/asi9040078

Chicago/Turabian Style

Abarca-Jiménez, Griselda Stephany, Manuel Vladimir Vega-Blanco, Jesús Mares-Carreño, Juan Cruz-Castro, and Yunuén López-Grijalba. 2026. "A Dual Approach to the A* Algorithm to Generate Consistent Trajectories for the Leader–Follower Scheme" Applied System Innovation 9, no. 4: 78. https://doi.org/10.3390/asi9040078

APA Style

Abarca-Jiménez, G. S., Vega-Blanco, M. V., Mares-Carreño, J., Cruz-Castro, J., & López-Grijalba, Y. (2026). A Dual Approach to the A* Algorithm to Generate Consistent Trajectories for the Leader–Follower Scheme. Applied System Innovation, 9(4), 78. https://doi.org/10.3390/asi9040078

Article Metrics

Back to TopTop