Decentralized Multi-Agent Trajectory Planning in Dynamic Environments with Spatiotemporal Occupancy Grid Maps
Siyuan Wu Gang Chen Moji Shi Javier Alonso-Mora


Characterizing the Age of Information with 
Multiple Coexisting Data Streams

    
Yoshiaki Inoue and Michel Mandjes
This work was supported in part by JSPS KAKENHI Grant Number
21H03399 and the NWO Gravitation project NETWORKS under grant agreement no. 024.002.003.

Y. Inoue is with 
Department of Information and Communications Technology, 
Graduate School of Engineering, Osaka University, Suita 565-0871, Japan 
(e-mail: yoshiaki@comm.eng.osaka-u.ac.jp).

M. Mandjes is with Mathematical Institute, Leiden University, P.O. Box 9512, 2300 RA Leiden, 
The Netherlands (e-mail: m.r.h.mandjes@math.leidenuniv.nl). He is also affiliated with Korteweg-de Vries Institute for Mathematics, University of Amsterdam, Amsterdam, The Netherlands; Eurandom, Eindhoven University of Technology, Eindhoven, The Netherlands; Amsterdam Business School, Faculty of Economics and Business, University of Amsterdam, Amsterdam, The Netherlands.


    
====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

empty
empty


This paper proposes a decentralized trajectory planning framework for the collision avoidance problem of multiple micro aerial vehicles (MAVs) in environments with static and dynamic obstacles. The framework utilizes spatiotemporal occupancy grid maps (SOGM), which forecast the occupancy status of neighboring space in the near future, as the environment representation. Based on this representation, we extend the kinodynamic A* and the corridor-constrained trajectory optimization algorithms to efficiently tackle static and dynamic obstacles with arbitrary shapes. Collision avoidance between communicating robots is integrated by sharing planned trajectories and projecting them onto the SOGM. The simulation results show that our method achieves competitive performance against state-of-the-art methods in dynamic environments with different numbers and shapes of obstacles. Finally, the proposed method is validated in real experiments.







§ INTRODUCTION
 

Decentralized multi-agent trajectory planning (MATP) problem in dynamic environments remains a challenging problem for years.
To solve this problem, the robot must avoid collisions with static and dynamic obstacles during planning, as well as with other MAVs.
A common approach to planning in dynamic environments inherits the pipeline used in static environments with modifications to account for dynamic obstacles <cit.>.
These methods rely on an Occupancy Grid Map (OGM) to represent static obstacles and generate a collision-free trajectory for each MAV <cit.>.
The trajectory is then further optimized to avoid dynamic obstacles and other robots, which are tracked and represented separately with fixed-shape models, e.g., ellipsoids <cit.>, columns <cit.> and axis-aligned bounding boxes <cit.>.

However, those methods require distinct pipelines for static and dynamic obstacles and other robots, often leading to trajectories that avoid dynamic obstacles but conflict with static ones or other robots.
To address this issue, we use Spatiotemporal Occupancy Grid Maps (SOGM) <cit.> to capture both the current and future occupancy status of arbitrary-shaped static and dynamic obstacles in the environment.
Moreover, we incorporate the occupied space of other robots within the same time window to achieve a unified representation of both obstacles and other robots.
Based on this representation, we employ spatio-temporal safety corridors to identify areas free from obstacles and other robots, effectively solving the MATP in dynamic environments.






































In this work, we assume that the SOGM of each robot is given, and extend a corridor-based trajectory optimization method to MATP in dynamic environments.


First, a kinodynamically feasible path is searched within the map, and spatio-temporal corridors are generated to maximize the free space.
Next, trajectories are generated by solving a minimum jerk trajectory optimization problem with the spatio-temporal corridors as constraints.
To prevent collisions between robots, other robots are treated as moving obstacles with known shapes, and their trajectories are shared via a communication network and represented simultaneously in the SOGM.
For dynamic obstacles, such as robots that do not communicate, we employ a constant velocity prediction.
Compared to existing MATP methods, our planner is capable of safely navigating multiple MAVs in complex environments with arbitrarily shaped static and dynamic obstacles.
Our contributions are summarized as:

	
  * A decentralized multi-robot collision avoidance framework that extends the corridor-based methods used in static environments to dynamic environments.
	
  * An efficient planning approach that generates safe trajectories in the SOGM and is capable of avoiding static and dynamic obstacles with arbitrary shapes.

  * A paradigm that integrates shared trajectories into occupancy grids to build corridors free from obstacles and other robots.
	
        
	
        




We will release our code for the community’s reference.



§ RELATED WORK
  



 §.§ MAV Planning in Dynamic Environment


MAV trajectory planning methods in dynamic environments can be divided into two categories, depending on whether they consider static and dynamic obstacles separately or jointly.
The first category <cit.> usually employs an OGM <cit.> to model static obstacles, taking advantage of its ability to represent arbitrary 3D shapes <cit.>.
However, dynamic obstacles are separately represented using a fixed-shape model with predicted trajectories, including ellipsoids <cit.>, spheres <cit.>, or bounding boxes <cit.>.
Their future trajectories are normally predicted by polynomial fitting methods <cit.> or the constant velocity model <cit.>.
This representation of dynamic obstacles narrows the free space and increases the difficulty of trajectory generation by introducing non-convex collision avoidance constraints.

Static and dynamic obstacles can be represented jointly.


<cit.> represents static and dynamic obstacles with a particle-based occupancy map <cit.> and uses a sampling-based method to find a trajectory that encounters fewer particles.
Further in <cit.>, risk-aware spatio-temporal corridors are generated on the map for trajectory optimization.
The trajectory generation method in <cit.> is limited to cubic corridors, which can be overly conservative, especially in environments with arbitrarily shaped obstacles.
Inspired by <cit.>, this work aims to extend these corridor-based methods to solve the MATP problem by addressing the aforementioned limitations.







 §.§ Decentralized Multi-Agent Trajectory Planning

Multi-agent trajectory planning in complex environments is a challenging task in aerial robotics.  

A few methods have been proposed to solve this problem in a decentralized manner for scalability and robustness <cit.>.



In these methods, robots usually coordinate with each other by sharing their current states or planned trajectories.
With the shared states, collision-free trajectories can be generated by constructing Buffered Voronoi Cells <cit.> or distributed MPC <cit.>, which provide better safety guarantees but inhibit flight speed.
When using shared trajectories, it becomes possible to plan more agile routes. For example, MADER <cit.> and Robust-MADER <cit.> broadcast planned trajectories through a communication network, and propose a check-recheck paradigm to avoid collisions with other robots.
EGO-Swarm <cit.> uses a reciprocal barrier cost to generate collision-free trajectories by solving unconstrained optimization problems.

In <cit.>, shared trajectories are used to generate linear relative safety corridors as hard constraints.
In this work, we depict the shared trajectories in SOGM, facilitating simultaneous collision avoidance for robots and obstacles with the spatio-temporal safety corridors. 





















§ METHODOLOGY
 

This section first briefly introduces how we use the SOGM in the MATP problem and describes the paradigm that integrates shared trajectories into SOGM (Sec. <ref>).

Then a kinodynamic path searching method designed for the SOGM is presented (Sec. <ref>).
Finally, we describe the method that generates corridors from the reference path and introduce the trajectory optimization method to generate collision-free trajectories within these corridors (Sec. <ref>).



 §.§ SOGM with Shared Trajectories Embedded
 

Various methods have been proposed to construct SOGMs from the point cloud, such as filtering-based methods <cit.> and learning-based methods <cit.>.
The resulting SOGM is a 4D OGM with spatial resolution r_s and temporal resolution r_τ.
In this work, we assume that the local SOGM denoted by 𝕄_k in the frame of robot k ∈{ 1, 2, …, K } with T-step predictions, which is generated by the perception algorithm in real-time (Fig. <ref>a).
𝕄_k(i) denotes the i-th frame of the SOGM 𝕄_k, which is an OGM between t_i - 1 and t_i.






In the MATP problem, collision avoidance between non-cooperative obstacles and other cooperative robots is challenging.
The difficulty primarily arises from the distinct representations of the two types of obstacles: Non-cooperative obstacles are represented by the SOGM, while cooperative robots are characterized by their trajectories.
It requires two independent pipelines to achieve collision avoidance, which is inefficient and sometimes intractable because a collision-free trajectory optimized in one pipeline might be infeasible in another pipeline.



Therefore, the published trajectories of cooperative robots are projected in the SOGM by accounting for the occupied grids of the robots from one time step to the next.
Assume that robot k receives shared trajectories p(t)_k^' and occupancy 𝒪_k^' from other robots k^'∈{ 1, 2, …, K }∖ k.
Then the occupancy of robot k^' traveled from t_i - 1 to t_i is represented as

    𝒪_k, k^'[t_i-1, t_i] = ∫_t_i-1^t_i𝒪_k^'⊕p(t)_k^' dt

which the corresponding 3D spaces occupied in the SOGM 𝕄_k as 𝒪_k^' moves along trajectory p(t)_k^' in the local frame of robot k, as shown in Fig. <ref>a.


Therefore, the SOGM considering cooperative robots can be represented as

    ℳ_k(i) = ( ⋃_k^'∈{ 1, 2, …, K }∖ k𝒪_k, k^'[t_i-1, t_i] ) ∪𝕄_k(i).

ℳ_k(i) will be updated applying the recent p(t)_k^' once 𝕄_k(i) is updated.
	For the initial robot, ℳ_1(i) = 𝕄_1(i) for all i ∈{ 1, 2, …, T } since no other trajectories are published.














 §.§ Kinodynamic Path Searching in SOGMs
 











We develop a path-searching method based on the kinodynamic algorithm A* <cit.> to find a kinodynamically feasible reference path (as shown in Fig. <ref>b).
Similar to <cit.>, we select the double integrator as the approximate model and generate a set of primitives by discretizing the control inputs of the robot.
The primitive duration is set to the temporal resolution r_τ of the SOGM.
The cost function is defined as the cumulative square of control inputs over the time horizon.
The heuristic function is computed by applying Pontryagin's minimum principle <cit.> which yields the optimal control input to reach the goal state.
Since this function is both admissible and consistent, optimality is guaranteed.
In many path-searching methods, obstacles are pre-inflated by the robot radius to facilitate feasibility checks.
Due to the high dimension of the SOGM, inflating the obstacles with the robot radius directly on the map is not efficient.
Instead, we first inflate the primitive with the shape of the robot and then check if the inflated primitive collides with obstacles in the corresponding temporal frame ℳ_k(i).




 §.§ Corridor Constrained Trajectory Generation
 
We develop a trajectory optimization method for the MATP problem to generate collision-free trajectories constrained by spatio-temporal corridors inspired by <cit.>.



  §.§.§ Spatiotemporal Corridor Generation


Upon determining a collision-free reference path in the SOGM, our objective is to delineate the obstacle-free region along this path before proceeding with trajectory generation.
Due to the dynamic nature of the environment, the safety region of the path may change with time, so the static corridor introduced in <cit.> is no longer applicable.
A natural approach is to locate the safety region at each temporal frame 𝕄_k(i) of the SOGM.
In this work, the spatio-temporal corridor is defined as a convex polyhedron 𝒫 = { x ∈ℝ^n | A_𝒫 x ≤b_𝒫} that encloses the safety region with the time window [t_i - 1, t_i].
The time duration of each corridor is determined by the time resolution r_τ of the SOGM.

The problem of finding the obstacle-free convex corridor constraints for robot R_k at temporal frame 𝕄_k(i) is formulated as the following optimization problem:

    max_A_𝒫, b_𝒫vol(𝒫),  s.t.  R_k⊂𝒫, 𝒪_k, i⊂𝕄_k(i) ∖𝒫,

To efficiently solve the optimization problem, we apply Fast Iterative Region Inflation (FIRI) <cit.>.


FIRI approximates the maximum volume polyhedron 𝒫 by iteratively and monotonically increasing the volume of its inscribed ellipsoid.
It formulates the problem as an equivalent second-order conic programming (SOCP) problem to decrease the dimension of the problem and reduce the computational cost.
Thanks to its efficiency, we can generate a sequence of feasible spatio-temporal corridors at 𝕄_k in less than 5ms.












Given that the corridor produced by FIRI solely encompasses the obstacle-free region without accounting for the robot's size, it is essential to shrink the corridor's size to guarantee that the robot can navigate through.
This reduction is achieved by inwardly adjusting all the corridor edges by the robot's radius, d.
Following this adjustment, a linear programming check is employed to confirm the corridor remains feasible and that consecutive corridors are interconnected.




  §.§.§ Minimum Jerk Trajectory Optimization


We employ the Bézier spline to parametrize the trajectory.
A Bézier spline is a n-th order piecewise polynomial defined as:

    p_j(t) = ∑_i=0^n c^i_j b_n^i(t - t_j-1) ,    t ∈ [t_j-1, t_j),

where c^i_j denotes the i-th control point at the j-th piece of Bézier spline.
b_n^i(t) = nit^i(1-t)^n-i is the Bernstein basis.





The Bézier spline carries an important property: the convex hull property, which guarantees that the trajectory is entirely inside the convex hull of the control points.
Therefore, we can confine the j-th piece of trajectory p_j(t) within the spatio-temporal corridors 𝒫 _j by constraining the corresponding control points {c_j^0, c_j^1, ⋯, c_j^n } as follows:

    A_𝒫 _jc_j^i ≤b_𝒫 _j,     i ∈{0,1,⋯,N},

By taking the above properties, we can formulate a minimum jerk trajectory optimization problem with spatiotemporal corridor constraints as follows:

	
    min_c∑_j=1^T∫_t_j-1^t_jd^3 p_j(t)/d t^3^2dt

	
    s.t.  p(t_0)=p_0,   p(t_T)=p_T

	
    p_j(t)∈𝒫 _j, ∀ t ∈ [t_j-1, t_j],    j=1,2,⋯,T

	
    p_j(t_j)=p_j+1(t_j),    j = 1, 2, ⋯, T

	
    p^(1)_j(t) ≤p^(1)_max,  p^(2)_j(t) ≤p^(2)_max,  ∀ t∈[t_0, t_T],


in which p_0 and p_T denote the initial and terminal position of the trajectory, and p^(1)_max and p^(2)_max give the upper bound of the velocity and acceleration.
Note this is a quadratic programming (QP) problem with linear constraints, which can be solved efficiently by modern QP solvers, e.g. OSQP.


In our method, the time allocation for trajectories is established during the path search phase, as opposed to emerging from the backend optimization.
This strategy is crucial to ensure the safety of the generated trajectories.
As a result, our backend optimization prioritizes spatial optimization with the temporal allocation fixed.
We intentionally avoid a comprehensive spatio-temporal optimization to avoid the computational burden of solving a non-convex optimization problem.
By employing this approach, we not only address the collision avoidance requirements but also achieve a more lightweight backend optimization.



 §.§ Multi-Agent Deconfliction
 

The deconfliction is considered to trigger the replanning of each agent.
Due to the Bézier spline's convex hull property, we check the linear separability between the control points of the optimized trajectory and those of the broadcasted trajectory.


Specifically, if the check step identifies a potential collision, the agent will update the SOGM and re-optimize a new trajectory;
Conversely, if no collision is detected, the agent will broadcast and execute the current trajectory.





§ RESULTS
 
We compared the performance of the proposed method with MADER <cit.> and EGO-Swarm <cit.> in simulations of 4 MAVs varying in dynamic obstacles' density and shape.
We then conducted real-world experiments with 2 MAVs in a complex environment with static obstacles and moving pedestrians to demonstrate the effectiveness of our approach.



 §.§ Simulation Experiment


The 3D simulation experiment was conducted on a laptop equipped with an AMD R7-5800H CPU.
The simulation environment is a 16m×16m×4m 3D space with randomly generated moving columns and circles, implemented based on a quadrotor simulator in <cit.>.
Dynamic obstacles are modeled as columns and circles of random sizes, initial positions, and velocities.
The widths of the columns and the radius of the circles are uniformly sampled from 0.5 to 1.0 m and 0.7 to 2.5 m, respectively.
The height of all the columns is 4.0 m, and the width of the circles is fixed at 0.1 m.
The velocities of the obstacles are randomly sampled from 0 to 1.0 m/s, and the directions are uniformly sampled from 0 to 2π.
Obstacles move with constant velocities and directions, and they rebound when they reach the boundary of the map space.
All MAVs are initialized in the hovering state at a height of 1.0 m, outside the obstacle space.
Their objectives are reaching their individual goals without any collision.


The experiments are divided into two types of environments with varying difficulty.
The first type is a mixed environment with columns and circles (Fig. <ref>–<ref>),
while the second type is a pure column environment (Fig. <ref>–<ref>) similar to that used in MADER <cit.>.
Fig. <ref>–<ref> presents a bird-eye view of these settings in a mixed environment with 20 columns and 20 circles.
This setup aims to create a more cluttered environment by breaking the convexity and isotropy of the obstacles.
Robots can choose either side to avoid columns; however, for circles, they must plan a 3D trajectory to avoid the edges.
Note that robots are allowed to pass through circles from center to center.
To quantify the difficulty, Table <ref> compares the average obstacle density in both environments that varies in the number of obstacles.
The obstacle density is defined as the ratio of the total volume occupied by obstacles to the volume of the space.

We compare our proposed method against two state-of-the-art baselines, MADER <cit.> and EGO-Swarm <cit.>, across three distinct position swap tasks: bilateral (Fig. <ref>), unilateral (Fig. <ref>), and cross (Fig. <ref> and Fig. <ref>). 
Unlike MADER and EGO-Swarm, which necessitate precise shapes and exact trajectories of obstacles, our method employs SOGMs.
To ensure a fair comparison, all methods are confined to using local obstacle information, namely the ground truth positions and velocities within a 5.0 m radius over a time horizon of 2.0 s. 
SOGMs are specifically generated for our approach.
The maximum velocity and acceleration are set to 2.0 m/s and 6.0 m/s^2, respectively.
We assume the perfect tracking control in simulation.
More than 50 trials are conducted in each setting. Average results are reported in Fig. <ref>.









The performance is compared in terms of the failure rate and average time to complete the task.
As shown in Fig. <ref>-<ref>, the proposed planner presents 95.3% and 88.5% average success rates in the mixed and pure environments when the number of obstacles is less than 30.
This result is comparable to the 87.3% and 90.8% success rates of EGO-Swarm, and better than the 87.5% and 84.8% success rates of MADER.
In mixed environments with more than 30 obstacles, our method achieves a success rate of 73.0% between all tasks compared to 45.2% and 21.0% for EGO-Swarm and MADER, respectively.
However, in pure environments with more obstacles, our method performs worse than both baselines in success rate and flight time.









To better understand the reason for the failure, we distinguish failures into two different types: collision and deadlock.
Collision only occurs when the agent is following a planned trajectory.
Deadlock is defined as a situation where a dynamic obstacle hits an agent after the agent has stopped due to the inability to find a feasible trajectory.
It reflects the inability to find a feasible trajectory when the search space is exhausted.
In many real-world scenarios, dynamic obstacles such as pedestrians may avoid the robots in a "deadlock" situation.

As shown in Fig. <ref> to Fig. <ref>, deadlock accounts for almost all failures in our method.
In contrast, EGO-Swarm hardly encounters deadlock, but it has a higher collision rate than other methods.
Safety arises because our method confines the planned trajectory within the corridors.
Furthermore, our method performs better in mixed environments than in pure environments.
As depicted in Fig. <ref>-<ref>, a significant decrease in the failure rate can be seen in environments with more obstacles.
These results reveal that the ability of the SOGM to represent obstacles with arbitrary shapes allows for greater flexibility in finding feasible paths in such environments.
Although it is feasible to dissect these obstacles into smaller elements and represent them using AABB or ellipsoidal costs, doing so increases the computational burden, making it challenging to achieve real-time performance.
Therefore, our method is more suitable for such environments. 















The run time of each step is evaluated on a laptop with an AMD R7-5800H CPU in mixed environments, shown in Fig. <ref>.
The overall execution time of our method is 17.19 ms on average, which is significantly faster than MADER <cit.> (31.04 ms).
The average run time of the kinodynamic path searching step is 1.93 ms, increasing with the number of obstacles.
This is because kinodynamic A* algorithm will traverse more nodes to find a feasible path as the obstacle density increases as in Table <ref>.
The corridor generation step takes 3.47 ms on average.
The trajectory optimization step takes an average of 11.79 ms, which is time-consuming due to the large number of polygon planes as corridor constraints.





 §.§ Real-World Experiment

We conducted real-world experiments in a 10m×10m×4m indoor environment to validate the efficiency of the proposed method, shown in Fig. <ref>.
Each robot is equipped with an NVIDIA Jetson Xavier NX for onboard computation.
Communication between robots is achieved via a WiFi network. 

Considering the limited onboard computational resources, we rely on the OptiTrack system to provide ground-truth information on dynamic obstacles to build the local SOGM.
The robot localization is provided by the OptiTrack as well, due to the limited accuracy and robustness of the onboard localization algorithm in dynamic scenes.
The maximum velocity and acceleration of the robot are set to 1.0 m/s and 4.0 m/s^2.
The planner runs at 10 Hz.
Experiment settings and the planning results are visualized in Fig. <ref> and Fig. <ref>.
For more details, please refer to the supplementary video.



§ CONCLUSION
 
This paper presents a decentralized multi-agent trajectory planning framework that is able to handle environments with arbitrarily shaped static and dynamic obstacles.
Our planner adopts the kinodynamic A* path-searching algorithm on the SOGM, allowing the robots to find a feasible path in such environments.
The corridor generation and trajectory optimization methods efficiently help generate safe and dynamically feasible trajectories.
Simulation results show that our method achieves more than 88.5% success rate in dynamic environments with less than 20 obstacles, which is comparable to both baselines.
In dynamic environments where obstacles cannot be represented by AABB or ellipsoids, our method outperforms the baselines by achieving a 51.9% and 27.7% lower failure rate than MADER and EGO-Swarm, respectively.
By classifying the failure cases into collision and deadlock, we find that the majority of our failures are due to deadlock cases.
Real-world experiments further validate the effectiveness of the proposed method.
However, in environments dense with obstacles or when there are numerous robots, this method is susceptible to significant deadlock issues.
This can be attributed to the absence of global guidance and the loss of topological homotopy under frequent replanning.
In future research, we will focus on multi-agent path finding with topological homotopy to mitigate these deadlock issues.

IEEEtran



