CG-UFRGS
Real-Time Multi-Agent Path Planning on Arbitrary Surfaces
Rafael P. Torchelsen1, Luiz F. Scheidegger1, Guilherme N. Oliveira1, Rui Bastos2, João L. D. Comba1
1Instituto de Informática - PPGC, UFRGS - Brazil
2NVIDIA Corporation
CG-UFRGS
2
Obstacle
Real-Time Multi-Agent Path Planning on Arbitrary Surfaces
GoalAgentObstacle
Shortest free path
CG-UFRGS
3
Related WorkPlanar Surfaces
1 2 3
1) Avneesh Sud, Erik Andersen, Sean Curtis, Ming Lin, and Dinesh Manocha. Real-time Path Planning in Dynamic Virtual Environments Using Multi-agent Navigation Graphs. IEEE TVCG 2008
2) S. J. Guy, J. Chhugani, C. Kim, N. Satish, M. Lin, D. Manocha, and P. Dubey. ClearPath: Highly Parallel Collision Avoidance for Multi-Agent Simulation. ACM SIGGRAPH/Eurographics Symposium on Computer Animation 2009
3) Avneesh Sud, Russell Gayle, Erik Andersen, Stephen Guy, Ming Lin, and Dinesh Manocha Real-time Navigation of Independent Agents Using Adaptive Roadmaps. ACM Symposium on Virtual Reality Software and Technology 2007
CG-UFRGS
4
Related WorkAgain: Planar Surfaces
Command and Conquer™
Distance computation is cheapEuclidian Distance: The mesh isn't considered on the distance computation
CG-UFRGS
5
Contributions
• Multi-agent navigation on non-planar surfaces• Multi-resolution distance computation• GPU-based approach for collision avoidance• CPU/GPU path planning pipeline
CG-UFRGS
6
Outline
• Related Work• Background• Global Navigation
– Hierarchical Computation of Distances
• Local Navigation– Collision Grid– Finding an Unobstructed Direction
• Results• Discussion• Conclusion
CG-UFRGS
7
Background
• Global Navigation• Local Navigation
Obstacle
GoalAgentObstacle
CG-UFRGS
8
Global Navigation
Several fields are need per frame
Constant FPSIncremental Computation
Fast Initial MovementIncremental Resolution
PerformanceParallel Computation
Rafael P. Torchelsen, Francisco Pinto, Rui Bastos and João L. D. Comba. Approximate on-Surface Distance Computation using Quasi-Developable Charts. Computer Graphics Forum v. 28 (Pacific Graphics 2009)
CG-UFRGS
9
Hierarchical Computation of Distances
RenderingDistance FieldComputationDistance Field
ComputationDistance FieldComputation
N Threads
f4
r3
f1
r1A1 AmM Agents A2 A3 A4 ...
Path PlanningPath Planning
Path Planning
...f4
r2
f3
r3
f2
r1
f2
r2
f3
r2
f3
r1
M Threads
CPU GPU
Available
f4
r3
f1
r1
f4
r2
f3
r3
f2
r1
f2
r2
f3
r2
f3
r1
Distance Fields Destination Resolution
To be Processed
Fd
rr
Not Ready
fd
rr
Ready fd
rr
First...
Fd
rr
Last
Collision Grid
Distance Fields Destination Resolution
Distance Field Slot
CG-UFRGS
10
Outline
• Related Work• Background• Global Navigation
– Hierarchical Computation of Distances
• Local Navigation– Collision Grid– Finding an Unobstructed Direction
• Results• Discussion• Conclusion
CG-UFRGS
11
Collision Grid
A1 AmM Agents A2 A3 A4
...
Collision GridAdvantage• 1 Agent <-> 1 Cell• Minimal Concurrent Access
• Static Data Structure• Regular• GPU-Friendly
CG-UFRGS
12
3-D Collision Grid: Advantage
A2
A1 A3
Obstacle
CG-UFRGS
13
Collision Test
A1
?
p1
?
?
?
?
?
?
?
?
? ?
?
?
?
?
?
?
?
?
?
?
?
? ?
? ?r
CP1 CP2
?
CP3
CP4
CP5
CP6
CP0
CP7
? Cell checked for collision
rDistance between collision check points
An Agent
pn Agent destination
Path taken
Collision test radius around CP
CPn Collision check point along the path
CG-UFRGS
14
Collision Avoidance
A1
p1A3
A2
+α
-α
+2α
-2α
+β
-β
CG-UFRGS
15
Rotating the Gradient
0º15º45º80º90º120º
Rotation
A1
Goal
A1
CG-UFRGS Finding a Free Route
? ? ? ? ?
? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ?
? ? ? ? ?
p1
A2
A1
? ? ? ? ?
? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ?
? ? ? ? ?
A2
p1
A1
? ? ? ? ?
? ? ? ? ?
? ? ? ? ?
? ? ? ? ?
? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ?
? ? ? ? ?
? ? ? ? ?
A2
p1
A1
? ? ? ? ?
? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ?
? ? ? ? ?
A2
A1
p1
CG-UFRGS
17
Outline
• Related Work• Background• Global Navigation
– Hierarchical Computation of Distances
• Local Navigation– Collision Grid– Finding an Unobstructed Direction
• Results• Discussion• Conclusion
CG-UFRGS
18
Results
Tris: 20 000Verts: 10 000FPS: 30Agents: 512Grid Res: 1283
The agent color indicates the goal it is afterAfter the agent reaches a goal it moves to another
CG-UFRGS
19
Tris: 10 000Verts: 5 000FPS: 30Agents: 512Grid Res: 1283
The agent color indicates the goal it is afterAfter the agent reaches a goal it moves to another
Results
CG-UFRGS
20
Performance
CG-UFRGS
21
Outline
• Related Work• Background• Global Navigation
– Hierarchical Computation of Distances
• Local Navigation– Collision Grid– Finding an Unobstructed Direction
• Results• Discussion• Conclusion
CG-UFRGS
22
Discussion• Non Collision Free– First step towards the solution
• Only collision avoidance• Collision Grid– Non smooth response– False positive
A2
A1
CG-UFRGS
23
Conclusion
• Multi-agent navigation on non-planar surfaces
• Multi-resolution distance computation
• GPU-based approach for collision avoidance
• CPU/GPU path planning pipeline
CG-UFRGS
24
Questions?
CG-UFRGS
25
CG-UFRGS
26
Performance