real-time motion planning of multiple agents and

REAL-TIME MOTION PLANNING OF MULTIPLE AGENTS
AND FORMATIONS IN VIRTUAL ENVIRONMENTS
by
Yi Li
M.Sc., The Royal Institute of Technology (KTH), 2001
A THESIS SUBMITTED IN PARTIAL FULFILLMENT
OF THE REQUIREMENTS FOR THE DEGREE OF
D OCTOR
OF
P HILOSOPHY
in the School
of
Engineering Science
c Yi Li 2008
SIMON FRASER UNIVERSITY
Fall 2008
All rights reserved. This work may not be
reproduced in whole or in part, by photocopy
or other means, without the permission of the author.
APPROVAL
Name:
Yi Li
Degree:
Doctor of Philosophy
Title of thesis:
Real-Time Motion Planning of Multiple Agents and Formations in
Virtual Environments
Examining Committee:
Dr. Daniel C. Lee
Chair
Dr. Kamal Gupta, Senior Supervisor
Professor, School of Engineering Science
Dr. Shahram Payandeh, Supervisor
Professor, School of Engineering Science
Dr. Binay Bhattacharya, Supervisor
Professor, School of Computing Science
Dr. Richard T. Vaughan, Internal Examiner
Assistant Professor, School of Computing Science
Dr. Dinesh Manocha, External Examiner
Professor, The University of North Carolina at Chapel Hill
Date Approved:
ii
Abstract
In this thesis, we studied the problem of real-time motion planning of multiple agents and multiple
formations in virtual environments and games. In many such applications, agents move around
and their motions must be planned. We are especially interested in motion planning in Real-time
Tactical (RTT) games because they offer a challenging problem setting due to the following aspects:
multiple agents, real-time, dynamic obstacles, complex environments, coherence of the agents (e.g.,
formations), and inexpensive pre-processing.
We use the (basic) continuum model — a real-time crowd simulation framework based on the
Fast Marching Method (FMM) — extensively in this thesis, because it unifies global planning and
local planning (e.g., collision avoidance). Since the basic model may fail to generate collisionfree paths in certain constrained situations (e.g., when agents pass through narrow passages) due
to deadlocks amongst the agents, we propose to use a principled and efficient AI technique for
decision making and planning (i.e., Coordination Graph (CG)) to avoid such deadlocks in the narrow
passages.
Next, we present the adaptive multi-resolution continuum model — an extension to the basic
continuum model — to plan motions of multiple agents in virtual environments. It allows each
agent to have its own goal compared to the basic model, where agents have to be grouped into a few
groups, while retaining the advantages of the basic model such as unified global planning and local
planning.
Finally, we present a flexible virtual structure approach to the multi-agent coordination problem
in virtual environments. The approach conceives of agents in a formation as if they lie on an elastic
shape, which is modeled using the Boundary Element Method (BEM). Due to the BEM’s boundaryonly nature, even a formation with a large number of agents can be deformed in real-time. This
flexible virtual structure approach for formation control is then combined with the continuum model
to plan motions of multiple formations in virtual environments. To the best of our knowledge, this
iii
motion planning algorithm for multiple formations is the first one that does not use ad-hoc and local
approaches and hence agents in a formation do not split easily from the formation.
We believe that these three algorithms can be used as basic motion planning toolkits toward
enhancing the capabilities of RTT games.
iv
To my parents.
v
Who drives the horses of the sun
Shall lord it but a day;
Better the lowly deed were done,
And kept the humble way.
The rust will find the sword of fame,
The dust will hide the crown;
Ay, none shall nail so high his name
Time will not tear it down.
The happiest heart that ever beat
Was in some quiet breast
That found the common daylight sweet,
And left to Heaven the rest.
— The Happiest Heart, J OHN VANCE C HENEY, 1913
vi
Acknowledgments
This thesis dissertation marks the end of a long and eventful journey for me. I would like to gratefully
acknowledge all the people who supported me along the way. Above all I would like to acknowledge
the tremendous sacrifices that my mother Yun Ma and my father Dr. Ming Li made to ensure that I
had an excellent education. For this and much more, I am forever in their debt. It is to them that I
dedicate this dissertation.
I am grateful to my Ph.D. supervisor Kamal Gupta, whose thoughtful guidance and continuing
support have lead me to grow immensely over the last five years. During these years, I was fortunate
to have some very nice lab-mates: Yifeng Huang, Moslem Kazemi, Lila Torabi, Pengpeng Wang, and
Zhenwang Yao. It will be boring without you. I also like to thank prof. Shahram Payandeh for his
valuable contributions to this thesis and all other committee members for accepting the invitation to
be part of my committee.
When I was an exchange student in Houston, Texas, USA during the academic year 1999-2000,
I was fortunate to take a couple of robotics courses from prof. Guanrong (Ron) Chen at University of
Houston and prof. Lydia Kavraki at Rice University. I must have enjoyed those classes immensely,
because I made eventually the decision to become a Ph.D. student in the field of robotics.
I visited the Visual Agent Laboratory (VAL) of the Toyohashi University of Technology (TUT)
in Toyohashi, Japan from October 15, 2006 to January 15, 2007. I would like to thank prof. Shigeru
Kuriyama for his kindness. The three months I spent at TUT has definitely broadened my view
and changed the course of my research. I am very grateful to the Royal Swedish Academy of
Engineering Sciences (IVA) and the Hans Werthén foundation who made the trip possible. Finally,
I would like to thank Dr. Kevin T. Chu at Princeton University for providing me with a customized
version of their Level Set Method Library (LSMLIB) and Mr. Brian Corrie at the IRMACS Centre
at Simon Fraser University for his help in parallel implementation of coordination graphs.
This research has been enabled by the use of WestGrid computing resources, which are funded
vii
in part by the Canada Foundation for Innovation, Alberta Innovation and Science, BC Advanced
Education, and the participating research institutions. Work on this thesis was supported in part, by
a grant from Natural Sciences and Engineering Research Council (NSERC) of Canada.
viii
Curriculum Vitae
Yi Li studied electrical engineering at the Royal Institute of Technology (KTH), Stockholm, Sweden
between 1996 and 2001. In the academic year 1999/2000, he was an exchange student at University
of Houston and Rice University in Houston, TX, USA. After receiving the M.Sc. degree from KTH
in 2001, he worked at Ericsson AB in Kista, Sweden as a software engineer and developed software
for Ericsson’s WCDMA Radio Base Stations. Between 2003 and 2008, he studied as a Ph.D. student
under the supervision of Prof. Kamal Gupta at Simon Fraser University, Burnaby, Canada.
ix
Publications
Conference Papers
1. Yi Li and Kamal Gupta. Real-time motion planning of multiple formations in virtual environments: flexible virtual structures and continuum model. In Proceedings of IEEE/RSJ
International Conference on Intelligent Robots and Systems, 2008.
2. Yi Li and Kamal Gupta. Motion planning of multiple agents in virtual environments on parallel architectures. In Proceedings of IEEE International Conference on Robotics and Automation, pages 1009 - 1014, 2007.
3. Yi Li and Kamal Gupta. A hybrid two-layered approach to real-time motion planning of multiple agents in virtual environments. In Proceedings of IEEE/RSJ International Conference on
Intelligent Robots and Systems, pages 4362 - 4367, 2006.
4. Yi Li and Kamal Gupta. Large-scale agent formations in virtual environments using linear
elastic shapes. In Proceedings of International Conference on Computer Animation and Social
Agents, pages 91 - 96, 2005.
5. Yi Li, Kamal Gupta, and Shahram Payandeh. Motion planning of multiple agents in virtual
environments using coordination graphs. In Proceedings of IEEE International Conference on
Robotics and Automation, pages 380 - 385, 2005.
Videos
1. Yi Li and Kamal Gupta, Motion Planning of Multiple Agents in Virtual Environments (Video).
AAAI-07 (the Twenty-Second Conference on Artificial Intelligence) AI Video Competition,
Vancouver, BC, Canada, 2007.
x
Contents
Approval
ii
Abstract
iii
Dedication
v
Quotation
vi
Acknowledgments
vii
Curriculum Vitae
ix
Publications
x
Contents
xi
List of Tables
xiv
List of Figures
xv
1 Introduction
1.1
1
Motion Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
1.1.1
Configuration Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
1.1.2
Three General Path Planning Approaches . . . . . . . . . . . . . . . . . .
5
1.1.3
Random Sampling Based Approaches . . . . . . . . . . . . . . . . . . . .
6
1.1.4
Motion Planning of Multiple Robots . . . . . . . . . . . . . . . . . . . . .
7
1.1.5
Motion Planning of Multiple Robots in Dynamic Environments . . . . . .
8
1.1.6
Motion Planning of Multiple Robots as a Group/Formation . . . . . . . . .
10
xi
1.2
Thesis Problems and Overall Solutions . . . . . . . . . . . . . . . . . . . . . . . .
13
1.2.1
Motion Planning in Static Environments with Narrow Passages . . . . . . .
13
1.2.2
The Adaptive Multi-resolution Continuum Model . . . . . . . . . . . . . .
15
1.2.3
Flexible Virtual Structures and Motion Planning of Multiple Formations . .
17
1.2.4
Path Quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
1.3
Thesis Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
1.4
Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
2 Preliminaries
22
2.1
The Fast Marching Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22
2.2
The Continuum Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
3 Motion Planning in Environments with Narrow Passages
28
3.1
Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
3.2
Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30
3.2.1
Coordination Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30
3.3
Overall Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
3.4
Information Extraction from Binary Occupancy Grids . . . . . . . . . . . . . . . .
32
3.5
Motion Coordination with Coordination Graphs . . . . . . . . . . . . . . . . . . .
34
3.5.1
Construction of Coordination Graphs . . . . . . . . . . . . . . . . . . . .
34
3.5.2
Computation of Optimal Joint Actions . . . . . . . . . . . . . . . . . . . .
37
3.5.3
Deadlock Free Optimal Joint Actions . . . . . . . . . . . . . . . . . . . .
38
Parallel Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
3.6.1
Supervisor-Worker Paradigm . . . . . . . . . . . . . . . . . . . . . . . . .
39
3.6.2
Job Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
3.6.3
Asynchronous Message Delivery . . . . . . . . . . . . . . . . . . . . . . .
40
Experiments and Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
3.7.1
Hardware and Software Setup . . . . . . . . . . . . . . . . . . . . . . . .
41
3.7.2
Parallel Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . .
42
3.7.3
Usability in Real-Time Applications . . . . . . . . . . . . . . . . . . . . .
44
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
45
3.6
3.7
3.8
4 Motion Planning of Multiple Agents
4.1
51
Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xii
52
4.2
The Adaptive Continuum Model . . . . . . . . . . . . . . . . . . . . . . . . . . .
52
4.3
Extension: Multi-Resolution Channel Construction . . . . . . . . . . . . . . . . .
54
4.4
Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
56
4.5
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
58
5 Motion Planning of Multiple Formations
64
5.1
Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
65
5.2
Overall Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
66
5.3
Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
67
5.3.1
The Boundary Element Method . . . . . . . . . . . . . . . . . . . . . . .
67
A Flexible Virtual Structure Approach For Formation Control . . . . . . . . . . . .
73
5.4.1
Real-Time Formation Deformation
. . . . . . . . . . . . . . . . . . . . .
73
5.4.2
Fast Collision Detection For Self-Collision Free Deformation . . . . . . .
74
5.4.3
Generation Of Deformations . . . . . . . . . . . . . . . . . . . . . . . . .
75
Motion Planning Of Formations . . . . . . . . . . . . . . . . . . . . . . . . . . .
76
5.5.1
Construction Of Unit Cost Field . . . . . . . . . . . . . . . . . . . . . . .
76
5.5.2
Moving Formation Along Gradient: Construction Of Waypoints . . . . . .
77
5.5.3
Social Potential Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . .
78
5.5.4
Formation Deformation
. . . . . . . . . . . . . . . . . . . . . . . . . . .
79
Experiments And Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
79
5.6.1
The Flexible Virtual Structure Experiments . . . . . . . . . . . . . . . . .
80
5.6.2
The Motion Planning Experiments . . . . . . . . . . . . . . . . . . . . . .
82
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
84
5.4
5.5
5.6
5.7
6 Conclusion and Future Work
99
6.1
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
99
6.2
Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
A DVD Movies
103
Bibliography
104
xiii
List of Tables
3.1
Runtime of one CG task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
3.2
Runtimes of 40 equal-size CG tasks. . . . . . . . . . . . . . . . . . . . . . . . . .
43
3.3
Runtimes of unequal-size CG tasks (with and without scheduling). . . . . . . . . .
43
4.1
Speed comparison between the basic continuum model and our adaptive approach.
60
5.1
Computation time of the BEM matrices in millisecond and average computation
time (over 20 different deformations) for one deformation in millisecond for the Vee
formation in Fig. 5.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2
81
Average computation time for one deformation in millisecond for the infantry formations. K is the number of the control nodes, E is the number of control nodes,
5.3
and N is the number of agents. The number of deformations was 20 in each case. .
81
Running Time (millisecond/cycle). . . . . . . . . . . . . . . . . . . . . . . . . . .
84
xiv
List of Figures
1.1
The continuum model can compute collision-free paths for multiple agents in realtime when the agents are moving in an environment without any narrow passages
(Fig. 1.1a), but it may fail if the environment contains narrow passages (Fig. 1.1b).
For example, as shown in Fig. 1.1b, agents #2 and #5 are in deadlock because agent
#2 is moving right and trying to exit the narrow passage while agent #5 just entered
the passage and is moving left. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2
10
When a formation in [70] encounters an obstacle that’s within its front projection,
the formation is split into two formations. As soon as these formations have passed
the obstacle, they merge back into one formation. . . . . . . . . . . . . . . . . . .
1.3
Two groups of agents are moving in an environment with one roundabout and four
entrances. Agents must move counterclockwise inside the roundabout. . . . . . . .
1.4
11
15
Paths for 20 agents (on a 64 × 64 grid) constructed by our adaptive multi-resolution
continuum model. The simulation cycle ran at 40 hertz (i.e., five times faster than
the basic model). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.5
17
Paths for four formations in a virtual environment (64 × 64 grid) without static obstacles. Each formation’s initial configuration and final configuration are shown as
a number of black circles and black discs (which represent the agents), respectively.
2.1
19
Discretized grid structure [91], where the scalar fields g and φ are stored inside each
grid cell, whereas the anisotropic fields such as f , C, and ∇φ are stored at each face
between two neighboring grid cells. The fields f , g, and C are set in Section 2.2,
whereas φ is the solution to (2.1) computed using the FMM. . . . . . . . . . . . .
xv
24
3.1
Narrow passages (from left to right): one lane passage (e.g., one lane bridge), 3-way
intersection (e.g., T intersection, Y intersection), 4-way intersection (i.e., crossroad),
and circular intersection (i.e., roundabout). . . . . . . . . . . . . . . . . . . . . . .
29
3.2
Coordination graph for a coordination problem with 4 agents. . . . . . . . . . . . .
31
3.3
An environment with two narrow passages. . . . . . . . . . . . . . . . . . . . . .
46
3.4
An environment with one roundabout. . . . . . . . . . . . . . . . . . . . . . . . .
47
3.5
The rendering is decoupled from the supervisor and its workers. The processes
communicate with each other through System V message queue and shared memory.
47
3.6
Speedups for 40 equal-size CG tasks. . . . . . . . . . . . . . . . . . . . . . . . . .
48
3.7
Speedups for unequal-size CG tasks (with and without scheduling).
48
3.8
Two groups of agents are moving in an environment with one narrow passage and
. . . . . . . .
three entrances. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.9
Two groups of agents are moving in an environment with one roundabout and four
entrances. Agents must move counterclockwise inside the roundabout. . . . . . . .
4.1
49
50
Reducing the domain for potential constructions from all grid cells (left) in the virtual environment to a channel (right). . . . . . . . . . . . . . . . . . . . . . . . . .
53
4.2
0 → 0 paths for 20 agents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
61
4.3
2 → 0 paths for 12 agents in an environment with narrow passages. . . . . . . . . .
62
4.4
0 → 0 paths for 5 agents in an environment with dynamic obstacles. . . . . . . . .
63
5.1
A formation R i is mapped from frame Ffi , where it is defined, to the environment’s
frame of reference Fw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2
85
A Vee formation located on an imaginary circular elastic shape can be deformed in
real-time using BEM by displacing the (red in the color version) box control nodes
located on the elastic shape. The displacements of the control nodes are represented
by arrows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.3
86
Path for a rank formation in a virtual environment (64 × 64 grid). The formation’s
initial configuration and final configuration are shown as a number of black circles
and black discs (which represent the agents), respectively. . . . . . . . . . . . . . .
5.4
87
Paths for three Vee formation in a virtual environment (64 × 64 grid). Each formation’s initial configuration and final configuration are shown as a number of black
circles and black discs (which represent the agents), respectively. . . . . . . . . . .
xvi
88
5.5
Paths for four formations in a virtual environment (64 × 64 grid) without static obstacles. Each formation’s initial configuration and final configuration are shown as
a number of black circles and black discs (which represent the agents), respectively.
5.6
89
Paths for four formations in a virtual environment (64 × 64 grid) with static obstacles. Each formation’s initial configuration and final configuration are shown as a
number of black circles and black discs (which represent the agents), respectively. .
5.7
90
The rank formation in [70] is made smaller by moving its agents closer to each other
so that the smaller formation can fit through the small gap between the obstacles. .
91
5.8
Boundary Element Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
92
5.9
Construction of waypoints for formation R i at time t + ∆t. . . . . . . . . . . . . . .
93
5.10 Formations and their deformations. . . . . . . . . . . . . . . . . . . . . . . . . . .
94
5.11 An infantry of soldiers move around in a virtual environment (64 × 64 grid) with
three static obstacles. Figure No. 1 out a series of 4. . . . . . . . . . . . . . . . . .
95
5.12 An infantry of soldiers move around in a virtual environment (64 × 64 grid) with
three static obstacles. Figure No. 2 out a series of 4. . . . . . . . . . . . . . . . . .
96
5.13 An infantry of soldiers move around in a virtual environment (64 × 64 grid) with
three static obstacles. Figure No. 3 out a series of 4. . . . . . . . . . . . . . . . . .
97
5.14 An infantry of soldiers move around in a virtual environment (64 × 64 grid) with
three static obstacles. Figure No. 4 out a series of 4. . . . . . . . . . . . . . . . . .
xvii
98
Chapter 1
Introduction
Motion planning has been traditionally studied in the area of robotics. In recent years the techniques
are increasingly used in virtual environments and games. In many such applications, agents (called
entities in [40]) move around and their motions must be planned. There are four different types
of motions in virtual environments and games: navigation, animation, manipulation, and camera
motion. In this thesis, we focus on the navigation part (i.e., how each agent finds a route to a
particular goal while avoiding collisions with obstacles and other agents), because this artificial
intelligence (AI) problem is probably the most common AI problem in the game industry [68].
The objects of the navigation in games is to take agents to their goals while avoiding both static
obstacles (e.g., buildings, water, fences) and dynamic/movable obstacles (e.g., vehicles, floating
bridges). The game design may also require that agents avoid areas with hazardous conditions (e.g.,
agents may prefer open spaces over narrow passages because the narrow passages are easy for the
enemies to defend). These factors add to the realism of the game and should be taken into account
in the game design [68].
We are especially interested in motion planning in Real-time Tactical (RTT) games. RTT is
a genre of computer games that could be characterized as war-games in real-time and the players
in RTT games do not take “turns” like conventional strategy video or board games. We focus on
RTT games in this thesis because they offer a challenging problem setting owing to the following
aspects [65, 66]:
1. Multiple agents: There are large numbers of agents moving around in the virtual environments and those agents must avoid each other. Each agent typically has 2 or 3 degrees of
freedom (DOFs).
1
CHAPTER 1. INTRODUCTION
2
2. Real-Time: The agents’ motions must be computed in real-time. Thus, the planner must be
able to perform a path query in real-time while the game is being played.
3. Dynamic: Virtual environments contain not only static obstacles, but also dynamic obstacles.
4. Complexity: Virtual environments can be complex.
5. Coherence: A collection of agents in a virtual environment may share a common goal. The
resulting motions of the agents in the same group planned by a planner must be perceived by
humans as being coherent (i.e., they must stay together and follow the same route to the goal).
6. Inexpensive pre-processing: A planner may not spend more than a few seconds in the preprocessing phase because (1) a gamer may only tolerate a few seconds of delay when starting/loading the game and (2) virtual environments are often generated by computers when the
game is being started/loaded.
The key underlying problem is to plan motions of multiple agents in real-time and with a short
pre-processing phase. In this thesis, we assume that there is no uncertainty in the agents’ motions
and the virtual environments are known. We study not only motion planning of multiple individual
agents, but also motion planning of multiple formations of agents, because agents are often grouped
together into formations in RTT games. A formation is a coherent group of agents establishing and
maintaining some predetermined geometrical shape by controlling the positions of orientations of
each individual agents relative to the group. For example, military ground forces (e.g., infantry,
cavalry), military aircraft, naval vessels are often deployed in tactical formations (e.g., column, line,
square, wedge/v formations).
The agent-based approaches such as flocking [73], steering behaviors [74], and an algorithm [95]
based on Reciprocal Velocity Obstacles [94], where motion for each agent is computed separately,
are widely used in the current generation of RTT games for simulation of multiple agents’ motions.
Because agent-based approaches combine the local collision avoidance with global path planning
(e.g., the multi-agent navigation algorithm in [95] uses a pre-computed roadmap for global path
planning and Reciprocal Velocity Obstacles for local navigation and collision), conflicts arise inevitably between the local goals and the global goals (e.g., in area of high congestion). A real-time
crowd simulation framework called the Continuum Model1 [91] addresses this problem by unifying global planning and local planning and thus agents modeled by the continuum model do not
1 The continuum model adapts a continuum perceptive in contrast to the agent-based approaches. It computes a set of
potential fields over the domain that guide all agents’ motions simultaneously.
CHAPTER 1. INTRODUCTION
3
face conflicting requirements between global planning and local planning. However, the continuum
model has to group the agents into a few groups (at most 4 in [91]) with all agents in a group sharing
the same goal in order to maintain real-time performance. In addition, the continuum model (and the
agent-based approaches) may fail to generate collision-free paths due to deadlocks in certain constrained situations (e.g., in narrow passages). Finally, the continuum model has only been applied to
motion planning of multiple agents, not groups/formations of agents. The quality of group behavior
in the current generation of RTT games is in general not good because they use ad-hoc and local
approaches and hence agents in a group split easily from the group and take different paths to the
goal (of the group) [40].
In this thesis, we build upon the continuum model and present three algorithms as basic motion
planning toolkits that can be used toward enhancing the capabilities of RTT games. In the first part of
the thesis, we use coordination graphs, a principled AI approach, in conjunction with the continuum
model, that allows us to plan motions of multiple agents in real-time while avoiding deadlock in
two dimensional static virtual environments with narrow passages. In the second part, we present an
adaptive extension to the continuum model to the problem of real-time motion planning of multiple
(up to 40 in the experiments on a dual-core PC) agents with independent goals in two dimensional
dynamic virtual environments. The third and final part deals with realistic modeling of formations
and motion planning of multiple formations in two dimensional virtual environments with dynamic
obstacles. These three algorithms can be used as basic motion planning toolkits toward enhancing
the capabilities of RTT games.
Note that both the agent-based approaches and the continuum model run a continuous simulation
cycle of planning (e.g., computing potential functions) and execution/acting (e.g., moving opposite
the gradient of a potential function computed in the planning step) because no agent in RTT games
has prior knowledge of the future movements of other agents or dynamic obstacles. In order for an
agent to react timely on changes, the cycle must be run at a high frequency. Consequently, we plan
motions of multiple agents/formations online in real-time in this thesis (as opposed to the offline
approach widely used in the robotics community).
In the remainder of this chapter, we elaborate on the motion planning problem in Section 1.1.
We formally define the problems to be studied in this thesis and present the overall solutions in
Section 1.2. We detail the contributions and the outline of the thesis in Sections 1.3 and 1.4, respectively.
CHAPTER 1. INTRODUCTION
4
1.1 Motion Planning
In robotics, the objective of motion planning is to compute a sequence of admissible motions for one
robot in order to change the state of the world [54]. The simplest type of motion planing problem
is the path planning problem (i.e., computing a path for a robot that takes the robot from its initial
position to its goal position without colliding with the given static obstacles).
Most path planning algorithms transform the path planning problem of a robot in the workspace
into a simple problem of a moving point by mapping the robot to a point in the configuration
space [58]. The continuous configuration space is then sampled (for high dimensional C-spaces) [42,
43, 55, 59] or can even be discretized (for low-dimensional C-spaces) and a graph is constructed to
represent the connectivity of the continuous configuration space. Finally, the graph is searched for a
path that takes the robot to its goal without collisions using standard graph search techniques, such
as the Dijkstra’s algorithm or the A* algorithm. Note that most practical path planning algorithms
(for high dimensional configuration spaces) are not complete (i.e., they may fail to find a path even if
one exists and notify when no path exists), because achieving completeness is often computationally
intractable, so they trade-off completeness for computational efficiency.
1.1.1 Configuration Space
A robot moves in workspace W (either R 2 or R 3 ). If the position of every point in the robot can
be uniquely determined by d parameters, then the configuration of the robot is a d-dimensional
parameter vector and it is a point in the d-dimensional configuration space C . For example, all
agents in this thesis move in a R 2 workspace W and the configuration of each agent is its position
(x, y) and orientation θ , where θ ∈ [−π , π ). When a robot at a configuration q is collision-free (with
obstacles and itself), the configuration q is called free. The free configuration space C f ree is then
defined as the subset of all free configurations. The configuration space obstacle C obs is simply the
complement of all free configurations.
With the notion of the configuration space C , the path planning problem for a robot becomes that
of finding a path for a point (that represents the robot) in the free configuration space C f ree . More
formally:
Definition 1.1.1 (Path Planning Problem). Given a robot’s initial configuration qinit and a desired
goal configuration qgoal , find a path between qinit and qgoal that lies in the free configuration space
C f ree of the robot .
CHAPTER 1. INTRODUCTION
5
1.1.2 Three General Path Planning Approaches
A path planning algorithm usually represents the connectivity of the free configuration space C f ree
with a graph and then searches for a path between qinit and qgoal in C f ree for the robot. There are three
general approaches for construction and representation of the connectivity graphs: roadmap, cell
decomposition, and potential field. For simple path planning problems in two or three dimensional
configuration spaces, these approaches are fast, but in their original forms, they do not scale up
for high dimensional path planning problems (four or more). In the following, we present some
examples of those three approaches for path planning problems in two dimensional configuration
spaces.
A roadmap approach represents the connectivity of the free configuration space C f ree with a
graph G of one dimensional curves (i.e., the roadmap). Once the graph G is constructed, it is
searched for a collision-free path (i.e., the motion of the robot is restricted to the curves in G. In two
dimensional polygonal configuration spaces, the visibility graph [61] and the Voronoi diagram [63]
are two complete roadmap-based approaches: there is a collision-free path in the configuration
space C between qinit and qgoal if and only if there is such a path in the corresponding graphs. The
visibility graph approach captures the connectivity of C in a visibility graph Gvis : the nodes of Gvis
represent the vertices of the polygonal obstacles plus qinit and qgoal , and the edges of Gvis represent
the straight-line path between two nodes that does not intersect the obstacles. The Voronoi diagram
approach captures the connectivity of C in a Voronoi diagram. Paths produced by the visibility
graph approach graze the obstacles, while paths produced by the Voronoi diagram approach have
the maximum clearance. Note that Voronoi diagram is related to medial axis in the sense that the
Voronoi diagram of the edges of a simple polygon is also known as the medial axis (or skeleton) [19].
A cell decomposition approach first divides the free configuration space C f ree into simple, canonical regions called cells and then represents the connectivity of C f ree with a graph Gcell , where each
node of Gcell represents a cell and two nodes that represent two adjacent cells are connected with an
edge. A path between qinit and qgoal is simply a channel of adjacent cells in C f ree . Compared to the
visibility graph approach and the Voronoi diagram approach, the cell decomposition approach is not
a complete approach, but a resolution-complete approach (i.e., if a path exists, it can find it only if
the grid resolution is fine enough).
A potential field based approach [45, 4] constructs an artificial potential function U (q) over
the free configuration space C f ree to guide the robot from qinit to qgoal , where U (q) consists of
two components: an attractive component Ua (q) and and repulsive component Ur (q) (i.e., U (q) =
CHAPTER 1. INTRODUCTION
6
Ua (q)+Ur (q)). Ua (q) pulls the robot towards qgoal while Ur (q) steers the robot away from obstacles.
The main advantage of the potential field approach is that U (q) specifies the motion of the robot
given any q ∈ C . However, sometimes the robot may fail to reach qgoal when U (q) has local minima
and one of them traps the robot. If the robot is trapped, it can make some random moves to help itself
to escape from the local minimum [54]. Note that when the potential function U (q) is constructed
over a grid, U (q) is essentially a heuristic function for graph search on the grid.
A recent potential field type approach (i.e., the continuum model [91]) defines potentials as an
implicit Eikonal equation and then solves it using an efficient method called the Fast Marching
Method (FMM) [92, 80]. For a grid with N cells, the computational efficiency of the FMM is
O(N log N); it takes N steps to touch each grid cell, where each step takes O(log N). The FMM is
based on a node update formula which is consistent with the underlying continuous state space [1]
and consequently the solutions obtained by the FMM are better approximations of the continuous
and optimal paths [60] as compared to A* and Dijkstra’s algorithm. Thus, the FMM is preferable
over the latter algorithms. Because each potential field generated by the FMM has only one global
minimum at goal and hence no local minima, the continuum model can simply compute the optimal
path of an agent using gradient descent. Another benefit of the FMM is that its efficiency is not
affected by the complexity of (i.e. number and shapes of obstacles) of the virtual environment [69].
Finally, the underlying FMM [92] in the continuum model allows the continuum model to handle
circuitous routes (e.g., roundabouts) and hence enables the robot to follow the direction of the traffic
flow inside the roundabouts.
1.1.3 Random Sampling Based Approaches
During the past decade and a half, random sampling based approaches have become widely used because (1) they can handle high-dimensional configuration spaces and (2) they are easy to implement
due to the availability of collision checking libraries (e.g., RAPID – Robust and Accurate Polygon
Interference Detection [29], PQP – A Proximity Query Package [29, 53], PIVOT – Proximity Information from Voronoi Techniques [35, 36]). For example, a probabilistic roadmap (PRM) [43]
planner SBL [76] (for Single-query, Bi-directional, Lazy in checking collision) spends an average
of 443 seconds on a PC with 1 GHz Pentium III processor and 1 GB RAM running Linux to solve
motion planning problems with 6 robot arms, where each arm has 6 DOFs (i.e., 36 DOFs in total).
Random sampling based approaches can be divided into two classes: multi-query planning and
single-query planning. A multi-query planner proceed in two phases: a construction phase and a
CHAPTER 1. INTRODUCTION
7
query phase. During the construction phase, the planner tries to capture the connectivity of the free
configuration space C f ree by sampling C at random and retaining the free configurations (i.e., the
milestones) as nodes in roadmap (graph) G. Each edge of the roadmap G represents a collisionfree straight-line path between the two configurations in the edge’s two nodes. Once qinit to qgoal
are connected to the graph, the graph is searched using the Dijkstra’s shortest path algorithm in
the query phase to find a path between qinit and qgoal . The multi-query planning is suitable for
static environments, because once the roadmap is constructed, multiple queries can be performed
in the same environment quickly. However, if environments are dynamic, single-query planning
should be used instead. A single-query planner (e.g., Ariadne’s clew algorithm (ACA) [59] and
Rapidly-exploring Random Trees (RRT) [55, 51]) does not perform pre-computation to capture the
connectivity of the free configuration space C f ree . Instead it processes a single query as fast as
possible by building a small roadmap on the fly, where the roadmap is typically constructed by
expanding two trees (one rooted at qinit and the other rooted at qgoal ) until one milestone in one tree
is connected with one milestone in the other tree.
In addition to completeness and resolution completeness, there is a third form of the notion
of completeness called probabilistic completeness: random sampling based approaches may not
terminate when there is no solution, but if a solution exists, the probability that the random sampling
based approaches find it converges to one as the time goes to infinity. In fact, both the multi-query
planners and the single-query planners converge exponentially [38, 52, 88] under some geometric
assumptions on the configuration space. A complete motion planner that combines approximate cell
decomposition with probabilistic roadmaps was presented in [98]. However, it has only been applied
to rigid robots with low DOFs (3-DOFs and 4-DOFs).
1.1.4 Motion Planning of Multiple Robots
The standard approaches for motion planning of multiple robots can be divided into two major
categories: centralized planning and decoupled planning [54].
The centralized methods consider all agents as one robotic system with many degrees of freedom, and its time complexity is exponential in the dimension of the composite configuration space.
For example, the average runtime of the centralized planner SBL [76] for the simplest problem
in [76] increases from 0.26 sec to 28.91 sec when the number of robot arms increases from 2 to 6.
Thus, centralized planning is not suitable for motion planning of multiple robots with real-time constraints (e.g., motion planning of multiple agents in virtual environments such as computer games).
CHAPTER 1. INTRODUCTION
8
Decoupled planning is less expensive than centralized planning because the decoupled methods
break a problem into simpler sub-problems and hence lower dimensional spaces are searched, but it
is not complete and may fail to find solutions even if they exist [44] and the resulting paths can be
far from optimal. There are two main decoupled planning techniques: prioritized planning [21] and
path coordination [54]. In the former, one plans path for one robot at a time. Each robot treats the
robots for which the motions have been planned as moving obstacles. This requires a core planner
with dynamic obstacle avoidance [41, 37]. Runtime of a recent prioritized approach [93] grows
quadratically with the number of robots: if the number of robots is n, then a trajectory is planned
n times to avoid O(n) other robots. In the implementation of [93], the planner takes 2 seconds to
coordinate motions of 20 robots (roadmap construction time not included); beyond that number, it
slows down substantially due to quadratic dependence on the number of robots. A reactive style
prioritized method based on potential fields [45] was presented in [97]. Although it can operate
in real-time, it cannot handle problems involving highly concave obstacles. The path coordination
approach [62] first plans a path for each robot separately. The robots have to move along these fixed
independent paths, but their motions are coordinated to avoid mutual collisions using coordination
diagram. The path coordination approach proposed in [62] can only handle two robots. A method
based on a bounding box representation of the obstacles in the coordination diagram was proposed
in [83]. Since this method does not compute the exact shape of the obstacles, it is able to coordinate
motions of more than 100 robots. However, it cannot operate in real-time (for example, it needs 39.7
sec to coordinate motions of 32 robots).
1.1.5 Motion Planning of Multiple Robots in Dynamic Environments
There are two broad types of the planning problem in dynamic environments: the motions of the
obstacles are either known (i.e., given beforehand) or unknown (i.e., no prior information about the
movements of the obstacles).
When the dynamic obstacles’ motions are known beforehand, the concept of the configurationtime space CT [54] can be used to solve the planning problem, where CT is defined by incorporating time T with the configuration space C as an additional dimension. For example, when the
dynamic obstacles are polygons and move piecewise-linearly in two-dimensional workspace, the
configuration-time space is three-dimensional and can be constructed explicitly. When the robot’s
velocity is unbounded, the planning problem can be solved in polynomial time using a vertical trapezoidal decomposition [77]. However, note that the motions of the dynamic obstacles in computer
CHAPTER 1. INTRODUCTION
9
games are normally not given beforehand.
When the motions of the dynamic obstacles are unknown beforehand, the motion planning problem of multiple robots becomes more complex. Algorithms for motion planning of multiple robots
in dynamic environments are divided into two classes: path modification and replanning.
Path modification methods such as elastic bands [71] and elastic strips [11] ensure a collision
free path by moving or deforming the path based on the movements of the dynamic obstacles. However, both elastic bands and elastic strips methods cannot handle changes in free-space connectivity.
A recent path modification method was presented in [23]. This physically-based, adaptive
roadmap based algorithm was implemented using a mass-spring simulation framework on top of
a roadmap-based motion planner to represent deformable links between nodes in a roadmap to capture the connectivity of the free space. Like other roadmap-based approaches, the algorithm in [23]
generates nodes randomly and its efficiency is affected by the complexity of (i.e. number and shapes
of obstacles) of the virtual environment [69]. Consequently, there is no guarantee on the optimality
of the resulting paths.
Instead of modifying the path, replanning methods replan at each step. Because the high cost of
performing the updates, the D* deterministic planning algorithms in [48, 84] make use of solutions
from previous steps instead of starting from scratch at each step.
A recent replanning method was presented in [87]. It constructs multi-agent navigation graph
(MaNG) dynamically using discrete Voronoi diagrams computed on graphics hardware and the resulting paths had maximal clearance. However, the maximal clearance is not always desirable because an agent may want to stay close to obstacles to avoid being detected by its enemies. Even
though graphics hardware can compute discrete Voronoi diagrams extremely fast, the performance
of [87] is limited by the fact that there exists overheads in transferring data to and from graphics
hardware.
As mentioned, the agent-based approaches combine the local collision avoidance with global
path planning and hence conflicts arise inevitably between the local goals and the global goals
(e.g., in the area of high congestion). The continuum model [91] (a replanning method) solves this
problem by unifying global path planning and local collision avoidance, because it is based on a
continuum perspective rather than per-agent dynamics as the name implies. The continuum model
can simulate motions of thousands of agents by grouping the agents together into a few (at most four
in [91]) groups, where all agents in each group share the same goal, and computing a single dynamic
potential φ using the FMM for each group in each update cycle. From a planning perspective, use of
the continuum model for planning multiple agents is essentially a decoupled prioritized approach,
CHAPTER 1. INTRODUCTION
10
4
2
1
3
4
3
2 5
6
1
6
5
8
7
Sample No. 2100
(a) An environment without any narrow passages.
Sample No. 1500
(b) An environment with one narrow passage.
Figure 1.1: The continuum model can compute collision-free paths for multiple agents in real-time
when the agents are moving in an environment without any narrow passages (Fig. 1.1a), but it may
fail if the environment contains narrow passages (Fig. 1.1b). For example, as shown in Fig. 1.1b,
agents #2 and #5 are in deadlock because agent #2 is moving right and trying to exit the narrow
passage while agent #5 just entered the passage and is moving left.
where all other agents are considered as obstacles for a given agent, albeit run at real-time rate. Even
though the continuum model could yield a solution in a large majority of cases, while retaining the
critical real-time character, it is not complete. Particularly, in constrained regions such as narrow
passages, it may not find a solution even if one exists. In our experiments (see Fig. 1.1), we found
that agents get stuck rather easily in narrow passages due to deadlocks.
1.1.6 Motion Planning of Multiple Robots as a Group/Formation
Multiple robots move sometimes as a group or even as a formation. For example, groups of agents
in RTT games move often in formations (i.e., they retain the “overall” geometric shape of the group,
as it moves around). In computer games, flocking [73] is widely used for simulating group movement. To achieve flock-like motion, boids2 in the same flock try to stick together while avoiding
collision with each other and obstacles in their environment in order. Several steering behaviors
were introduced in [74] so that boids can achieve higher level goals. Global information in the
form of a roadmap of the environment was added in [7] to enable even more sophisticated flocking
2 Generic
simulated flocking creatures are called boids in [73].
CHAPTER 1. INTRODUCTION
11
behaviors (e.g., homing, exploring, and shepherding). Nevertheless, boids can easily get stuck in
cluttered environment because all boids act based on local information only and the group can be
broken up while moving towards its goal. When a formation in today’s RTT games needs to pass
through obstacles, the formation often breaks at one or multiple split points as shown in Fig. 1.2.
This dilutes the visual impact of seeing a formation move efficiently around the virtual environment.
split point
Figure 1.2: When a formation in [70] encounters an obstacle that’s within its front projection, the
formation is split into two formations. As soon as these formations have passed the obstacle, they
merge back into one formation.
Two methods that guarantee coherence of the group were presented in [40, 39]. In [40], a group
of agents is enclosed by a deformable rectangle (i.e., the group shape) and PRM is used to plan
the global motions of the group shape. Local motions of the agents inside a deformable rectangle
are determined by group potential fields. The agents’ total motions are given by combining the
global motions of the groups and the local motions of the agents. Because this method is based on
PRM, it is not suitable for real-time applications such as computer games. The real-time method
presented in [39] finds first a path (called the backbone path) for a single agent. The backbone path
is then extended to a corridor using the clearance along the path. The agents can move freely inside
this corridor. A group region is a part of the corridor in which all agents must remain. Increasing
the maximum area of the group region allows the group to spread more along the backbone path.
CHAPTER 1. INTRODUCTION
12
Increasing the maximum corridor width makes the group wider, but decreases the longitudinal dispersion if the group region’s area is kept constant. An approach based on social potential force fields
is used in [39] to generate the paths inside the corridor. First, a repulsive force between the agents are
required to avoid collision between the agents. Second, a repulsive force from the boundary of the
corridor inward onto the agents forces the agents to stay inside the corridor. Third, a driving force
is applied to move the agents forward. Even though these two methods can guarantee coherence of
the group, they cannot move the agents in the group in formation.
Local motions of agents in a formation can be generated using one of three common formation
control approaches: the leader-follower approach [17], the behavior based approach [3], and the
virtual structure approach [56]. In the leader-follower approach, the leader moves along a path,
while the followers maintain desired distance and orientation to the leader. The leader-follower
approach is simple and has good scalability, but the approach cannot maintain the formation if a
follower is perturbed. The basic idea behind the behavior based approach is to prescribe several
desired behaviors (e.g., collision avoidance, formation keeping, target seeking) to each agent, and
the control action of each agent is then determined by the weighted average of the control for each
behavior. The main disadvantage of this approach is that it is difficult to explicitly define the group
behavior; hence, the behavior based approach is inadequate when the formation shape needs to be
changed (e.g., a formation may need to be deformed in order to pass through narrow passages). The
virtual structure approach to formation control [56] forces all robots in a formation behave as if they
are embedded in a single rigid structure and consequently the formation control is straightforward.
However, no automatic reconfiguring strategy was proposed in [56] to deform formations.
There has been some mention of a couple of ideas for motion planning of multiple groups of
agents (not in formations though) in [89], where each group of agents is modeled by the approach
presented in [39]. The first idea is based on prioritized planning for individual characters/robots [93].
Because all agents in a group have the same goal, the group can be represented by a single entity –
the group shape – that surrounds the agents in the group. The prioritized planner presented in [93]
is then used to plan the paths for multiple groups (i.e., the group shapes). In contrast to the first
idea, the second idea does not coordinate motions of different groups and paths for the groups are
planned independently. The motion for each group is planned using social force fields that move all
agents in the group along a backbone path with sufficient clearance, as in [39]. To plan motions of
multiple groups, an extra repulsive force between agents from different groups is added for collision
avoidance between those agents. To the best of our knowledge, these two ideas have not been
implemented.
CHAPTER 1. INTRODUCTION
13
1.2 Thesis Problems and Overall Solutions
As mentioned, the (basic) continuum model [91] is a real-time crowd simulation framework based
on the Fast Marching Method. The main advantage of the basic model is that it unifies global
planning and local planning (e.g., collision avoidance) and thus agents modeled by the basic model
do not face conflicting requirements between global planning and local planning. In addition, the
continuum model solves many challenges offered by RTT games: multiple agents (although the
continuum model can only plan motions of a small number of agents with independent goals in
real-time), real-time, dynamic, complexity, and inexpensive pre-processing. Therefore, the basic
continuum model is used extensively in this thesis.
However, the basic model may fail in certain constrained situations (e.g., when agents pass
through narrow passages as shown in Fig. 1.1b) to generate collision-free paths due to to deadlocks
amongst the agents. Another major drawback of the basic model is that it can only deal with a small
number of agents (or groups of agents) with independent goals. This is because it builds a potential
field (over the entire grid) for each separate goal, and the processing time for underlying computation
is such that only a few such fields can be built while maintaining real-time performance. Therefore
the basic model groups multiple agents together and and let them share the same potential field and
the same goal in order to maintain the real-time performance. Finally, the basic model is designed
for motion planning of multiple agents, and it does not address a key aspect of RTT games (i.e.,
coherence) and hence it does not plan motions of multiple formations, which are widely used in
RTT games.
We present three algorithms in this thesis to address these shortcomings of the basic continuum
model and we believe that they can be used as basic motion planning toolkits toward enhancing the
capabilities of RTT games. We assume in this thesis that all virtual environments are given as binary
occupancy grids.
1.2.1 Motion Planning in Static Environments with Narrow Passages
First, we propose to use a principled and efficient AI technique for decision making and planning
(i.e., Coordination Graph (CG) [34, 50]) to avoid such deadlocks in the narrow passages. One could,
in effect, think of placing an imaginary red-green traffic light at each entrance of a narrow passage.
If the light is red, all agents in the entrance have to wait until the light turns green, and only one of
them is allowed to enter the narrow passage at a time. Since only traffic lights that belong to the
same narrow passage and agents that are located in the same entrance need to coordinate, it is clear
CHAPTER 1. INTRODUCTION
14
that each traffic light/agent only has to coordinate with a small subset of other traffic lights/agents.
Such dependencies are exploited by coordination graphs. Furthermore, all traffic lights/agents in
a coordination graph share the same utility (i.e., the total utility or the value function [33]). This
is a so called coordination game (i.e., fully cooperative strategic game) [64], and the total utility is
assumed to be a linear combination of local value functions [33], where each local value function
involves only a few traffic lights/agents. The optimal joint action that maximizes the total utility is
then computed using the variable elimination algorithm [32]. The combination of the basic continuum model and coordination graphs allows us to plan agents’ motions in a variety of complex and
constrained situations, such as narrow passages, intersections, roundabouts (i.e., follow the direction
of the traffic flow).
Overall, the algorithm runs as follows. In the pre-processing phase, we identify narrow passages,
entrances to the narrow passages, and open spaces using two elementary operations in mathematical
morphology, dilation and erosion, and the region growing [28] procedure. At runtime, we use
the continuum model to plan motions of the agents by computing a single dynamic potential φ
using the FMM for each group in each update cycle and move each agent of the group opposite the
gradient of the potential function until all agents have reached their goals. Furthermore, we construct
coordination graphs and then compute optimal joint actions of the agents in the neighborhood of the
narrow passages to avoid deadlocks.
Because we have to process multiple coordination graphs in each update cycle, we speedup the
computation by processing them in parallel in a supervisor-worker paradigm on Symmetric Multiprocessing (SMP) systems. An SMP system has two or more identical processors connected to
a single shared main memory. We consider SMP systems because, first of all, the single shared
main memory allows the processors exchanging/sharing data efficiently. Moreover, our work is motivated by computer game applications. Although multi-core x86 processors are either dual-core or
quad-core for now, processor manufacturers are adding more cores to their multi-core processors
(e.g., Sun’s UltraSPARC T2 delivers eight cores). We show, via a parallel implementation on a SGI
UltimateVision with 24 processors, that our algorithm scales well with number of processors. Unfortunately, we could not render efficiently in 3D on the SGI UltimateVision because images/frames
must be sent through a rather slow network to our dual-core PC and displayed remotely. Consequently, no rendering was done on the SGI UltimateVision. Hence we tested the entire algorithm
(i.e., including rendering) on the dual-core PC. Our current implementation can coordinate motions
of about ten agents in real-time (on the dual-core PC). In Fig. 1.3, our algorithm coordinated actions
of 8 agents (divided into 2 groups) in real-time for deadlock avoidance in the roundabout and its
CHAPTER 1. INTRODUCTION
15
entrances.
7
6
3
4
2
5
1
8
Sample No. 2000
Figure 1.3: Two groups of agents are moving in an environment with one roundabout and four
entrances. Agents must move counterclockwise inside the roundabout.
1.2.2 The Adaptive Multi-resolution Continuum Model
Next, we present an adaptive extension to the basic continuum model [91] to the problem of real-time
motion planning of multiple agents in two dimensional dynamic virtual environments. In this adaptive approach, the potential field computation for each agent is restricted to a channel (i.e., a subset
of the environment), which is constructed/updated at a very low frequency, or whenever it is blocked
by some dynamic obstacles (e.g., doors). This affords us a substantial speedup in the algorithm, and
maintains the advantage of the continuum model such as unified global planning and collision avoidance, and its ability to handle dynamic obstacles. We further present a multi-resolution extension
of our adaptive approach. Simulations show that that our adaptive multi-resolution approach, while
maintaining a real-time performance, (i) handles a significantly larger number of individual agents
with independent goals, (ii) handles bigger grids than the continuum model, and (iii) provides a
natural way to steer agents from narrow passages to open spaces.
In our adaptive extension to the basic continuum model, the potential field computation (and the
CHAPTER 1. INTRODUCTION
16
resulting path) for each agent is restricted to a channel [67], a subset of the grid cells of the environment. This reduces the domain over which the potential field is constructed, thereby significantly
speeding up the computation. The intuition behind our adaptive approach is that once an agent’s
global path is set, there is no need to update it as frequently as the agent’s local path. The local
path has to be updated in each simulation cycle for obstacle avoidance, but the global path only
changes gradually (unless it is suddenly blocked by dynamic obstacles). The construction/update of
the channel itself requires (i) computing the potential field over the entire domain, (ii) computing
a backbone path derived from the potential field by following the negative of its gradient, and (iii)
growing the backbone path by a given margin. However, it is done at a very low frequency (less
than once per second) or whenever the channel becomes invalid (e.g., when it is blocked by some
dynamic obstacles or a change in the environment, such as a door closing). Note that the notion of
channels is very similar to the notion of corridors in [13, 24, 39], where each corridor is also constructed by growing a free region on either side of a backbone path. In [67], a channel was used to
control the amount of data to be searched, while a corridor in [13, 24, 39] was used to allow an agent
deviate locally from the global path (e.g., to avoid collisions with dynamic obstacles). Channels in
this thesis serve both purposes.
The adaptive continuum model is subsequently extended by constructing channels around backbone paths found at coarser resolution grids, and then planning motions of the agents at the original
higher resolution grid. Although our original motivation behind the multi-resolution extension was
further speedup in computation as in [67], the extension has a nice intrinsic advantage in that it
prefers open areas because narrows passages may appear as blocked at the coarse levels. This is a
desirable trait since otherwise deadlocks may occur in narrow passages. Note that the coarse level
grids are only used for agents that need to avoid narrow passages. If a path is not found at a coarse
level, we move on to the next higher resolution level until a path is found (if it exists). Therefore, our
method will not fail even if the paths that pass through narrow passages are the only options. We use
wavelets [18] for representing multi-resolution grids due to its flexibility. Because we assume that
virtual environments are given as occupancy grids, we use the simplest form of wavelets, the unnormalized Haar basis. However, if the environments are natural, rough terrains (e.g., mountains),
we can simply switch to more advanced wavelets with better approximation properties [67].
We have implemented this adaptive multi-resolution continuum model and our simulations show
that that our approach can plan motions of a larger number of individual agents on larger grids
compared to the basic continuum model without any pre-processing at all. Via simulations, we
show that our current implementation can plan motions of 40 agents on 256 × 256 grids in real-time
CHAPTER 1. INTRODUCTION
17
on a standard dual-core PC. For example, 20 agents’ paths constructed by our approach are shown
in Fig. 1.4, where the agents’ start positions and goal positions are marked as grey circles (green
on color prints) and black discs, respectively, along with their IDs and static obstacles are drawn in
dark grey (red on color prints).
17
19
4
10
16
14
13
8
9
7
19
11
1
17
18
3
5
2
12
14
15
12
4
8
16
13
11
20
20
9
15
1
Sample No. 2000
10
3
18
5
6
7
2
6
Figure 1.4: Paths for 20 agents (on a 64 × 64 grid) constructed by our adaptive multi-resolution
continuum model. The simulation cycle ran at 40 hertz (i.e., five times faster than the basic model).
1.2.3 Flexible Virtual Structures and Motion Planning of Multiple Formations
Finally, we propose a new approach to the problem of coordinating multiple agents to move in a
tightly controlled formation in a two-dimensional workspace, where each formation is modeled by
our flexible virtual structure approach for formation control. All agents in the formation are conceived as being located on the elastic shape that can be deformed in a controlled/ordered manner
and in real-time by simply displacing multiple control points/nodes placed on the elastic shape.
The deformation of the elastic shape induces a natural and intuitive looking deforming of the formation, which is a key strength of our approach. While there are many methods for modeling of
deformable objects (see the background section for a brief recapitulation of these methods), we
chose the Boundary Element Method (BEM) [9], a well-known physically based algorithm, primarily because it enables us to deform the formation in a controlled and ordered manner and in real-time
CHAPTER 1. INTRODUCTION
18
by displacing a few control nodes.
This flexible virtual structure approach for formation control is then integrated with the continuum model [91] to plan the motion of a formation in real-time in virtual environments with static and
dynamic obstacles. To plan motion of a formation, we reduce the formation to a point by growing
the obstacles (a standard technique in path planning literature [15]) and then apply the continuum
model to compute a potential field. From the gradient of the potential, we can generate a sequence
of waypoints for each agent of the formation and then use social potential fields [3] to move the
agent between its waypoints.
Please note that even though the continuum model can plan motions of thousands of agents (as
long as they are divided into a few groups, as mentioned above), the agents in each group do not
behave as if they are in a formation, since there is no such constraint. In fact, agents in the same
group can be far away from each other and the continuum model requires only that they share the
same goal position. By combining the continuum model and our flexible virtual structure approach
for formation control, we can plan motions of multiple formations in real-time, while each formation
deforming smoothly and in a controlled manner, as needed to navigate through narrow passages. If
the planner is not able to plan the motions of the formations, they are allowed to pass through each
other (e.g., when they have to pass through the same narrow passage), and our approach uses social
potential fields [3] to guarantee that agents in those formations do not collide with each other. In the
experiments, we plan motions of multiple (at most four) formations, where many formations have
around 20 agents each. We chose this size because it is consistent with RTT games where platoons
of soldiers move in formations (see, for example game “Empire Earth II”). Although our approach
is easily applicable to much larger formations. For example, paths for 4 different formations are
shown in Fig. 1.5. Note that the formations changed their orientations gradually and two of them
deformed during the simulation.
1.2.4 Path Quality
In motion planning literature, a short path is often treated as a good path because it takes longer to
execute a longer path [25]. For example, sampling-based planners create low-quality paths containing unnecessary and jerky motions due to their probabilistic nature, and many techniques have been
proposed to reduce length of path generated by these planners [25]. However, a short path is not
always a good path (e.g., in the thesis), because the shortest path for an agent may take it through
areas with hazardous conditions (e.g., areas such as narrow passages controlled by the enemies).
CHAPTER 1. INTRODUCTION
19
1
3
2
4
2
4
3
1
Sample No. 4041
Figure 1.5: Paths for four formations in a virtual environment (64 × 64 grid) without static obstacles.
Each formation’s initial configuration and final configuration are shown as a number of black circles
and black discs (which represent the agents), respectively.
Instead, the optimal path of an agent in this thesis is the one that minimizes a linear combination of
1) path length, 2) time to the goal, and 3) discomfort per time unit along the path (see Chapter 2).
One could define and then optimize a quality measure3 of the composite path. Our focus, from
a gamer’s point of view, has been on real-time behavior (e.g., the motion planner must react immediately when dynamic obstacles appear / disappear). In addition, in the motion planning literature,
often the effort is devoted to finding a collision-free path (a hard enough problem), and not the quality of path per se, which, it is assumed, a subsequent optimization step would yield. Consequently,
we have not attempted to define and optimize any quality measure of the composite path in this
thesis.
3 In many cases, a single scalar-valued function (e.g., the average arrival time of the agents or the arrival time of the
latest agent) is optimized [96].
CHAPTER 1. INTRODUCTION
20
1.3 Thesis Contributions
1. Motion Planning in Static Environments with Narrow Passages
We integrate coordination graphs with the continuum model and thus address a major drawback of the continuum model [91]: it may fail to generate collision-free paths due to deadlocks
amongst the agents in certain constrained situations such as when agents pass through narrow
passages. Our current implementation can coordinate motions of about ten agents in real-time
on a dual-core PC.
2. The Adaptive Multi-resolution Continuum Model
We propose an adaptive multi-resolution extension to the continuum model to plan motions
of multiple agents with independent goals (as compared to the basic continuum model). This
speeds up potential field computation for each agent by restricting the computation to a channel (i.e., a subset of the environment). As a result, the adaptive multi-resolution continuum
model can plan motions of a larger number of agents with independent goals as compared
to the basic continuum model. Our current implementation can handle up to 40 agents with
independent goals in real-time, whereas the basic model can handle only about four [91]. Furthermore, the multi-resolution part of our continuum model can steer the agents away from
narrow passages to open spaces.
3. Flexible Virtual Structures and Motion Planning of Multiple Formations
We propose a new approach to the problem of coordinating multiple agents to move in a tightly
controlled formation in a two-dimensional workspace. Agents in a formation are conceived
as being part of a two-dimensional elastic shape modeled using the boundary element method
(BEM), and the formation can be deformed in a natural and controlled manner and in real-time
by displacing a few control nodes on the elastic shape. Next, we present a novel approach
for real-time motion planning of multiple formations in virtual environments with dynamic
obstacles by combining the continuum model and our virtual structure approach for formation
control in virtual environments. To the best of our knowledge, this motion planning algorithm
for multiple formations is the first one that does not use ad-hoc and local approaches and
hence agents in a formation do not split easily from the formation.
CHAPTER 1. INTRODUCTION
21
1.4 Thesis Outline
We introduce the Fast Marching Method (FMM) [92, 79] and the (basic) continuum model [91]
we will use throughout this thesis in Chapter 2. In Chapter 3, we use Coordination Graph (CG) in
conjunction with continuum model to avoid deadlocks in the narrow passages. In Chapter 4, we
build upon the basic continuum model and present an adaptive multi-resolution continuum model
to the problem of motion planning of multiple agents in virtual environments, where each agent
has its own goal. In Chapter 5, we present a virtual structure approach for formation control in
virtual environments. Next, we present an approach for real-time motion planning of multiple formations in virtual environments with dynamic obstacles by combining the basic continuum model
and our virtual structure approach. We close the thesis with concluding remarks and future work in
Chapter 6.
Chapter 2
Preliminaries
We explain the Fast Marching Method (FMM) [92, 79] and the Continuum Model [91] in this chapter. The FMM is a consistent and accurate numerical algorithm based on entropy-satisfying upwind scheme and fast sorting technique for solving the nonlinear Eikonal equation. The FMM
is also highly efficient and it can solve the Eikonal equation on a rectangular orthogonal mesh in
O(N log N), where N is the total number of grid cells. The continuum model is a real-time crowd
simulation framework based on the Fast Marching Method. The main advantage of the continuum
model is that it unifies global planning and local planning (e.g., collision avoidance) and thus agents
modeled by the continuum model do not face conflicting requirements between global planning and
local planning.
2.1 The Fast Marching Method
Given a two-dimensional virtual environment and an agent’s initial position xa and (global) goal gb 1 ,
the optimal path p is the one that takes the agent from xa to gb while minimizing
R
p Cds,
where the
unit cost field C is an anisotropic field (i.e., C depends on both position and direction) [91]. Suppose
that there is a potential function φ (x), where x represents position. The gradient descent contours of
φ (x) that satisfies the Eikonal equation
k∇φ (x)k = C, C > 0, φ (gb ) = 0
1 The
(2.1)
Fast Marching Method does not restrict the goal to a single position. For example, the goal in Section 2.2 is
given as a collection of grid cells.
22
CHAPTER 2. PRELIMINARIES
23
are the optimal paths [47], where φ is a scalar field and it only depends on position (i.e., x). The
right-hand side of (2.1), C > 0, and the boundary condition that φ equal 0 at the agent’s (global)
goal gb ) are the inputs to the Eikonal equation and are assumed to be known.
Consider the case of
k∇φ (x)k = 1, φ (gb ) = 0
(2.2)
If the agent’s goal gb is a single point, the solution to this Eikonal equation with C = 1 on the righthand side is just the distance to gb and it can be easily constructed by expanding a boundary curve
from gb (i.e., initially, the boundary curve is a circular curve located at gb ) in a normal direction
with unit speed because C controls the expanding speed of the boundary curve and it is equal to
1 everywhere in this case. However, when C is not equal to 1 everywhere, this boundary curve
may eventually cross itself and we get a multi-valued “swallowtail” solution [80]. The solution we
are looking for is the one that satisfies the entropy condition (i.e., no multi-valued “swallowtails”).
This entropy-satisfying solution can be constructed by imagining the boundary curve as a source
for a propagating flame and requiring that a point in the virtual environment stays burnt once the
expanding front passes it and ignites it.
Another way to obtain this entropy-satisfying solution comes the mathematical theory of viscosity solutions or (weak solutions). Viscosity is a measure of the resistance of a fluid to being
deformed and it is commonly perceived as “thickness” or resistance to flow. Here, the idea of viscosity is used to smooth out the corner in the propagating boundary curve by adding a smoothing
term to the Eikonal equation (2.1). Consider the associated “viscous” partial differential equation
given by
k∇φ (x)k = C + ε ∇2 φ (x)
(2.3)
It is shown in [81] that the viscous term ε ∇2 φ (x) smooths out sharp corners in the solution and
eliminates multi-valued “swallowtails” as ε → 0.
The Fast Marching Method is a numerical method that automatically extracts this viscous limit.
In fact, there are two different Fast Marching Methods: Tsitsiklis’ algorithm [92] and Sethian’s
algorithm [79]. We use Tsitsiklis’ algorithm in this thesis because it is efficient when agents must
CHAPTER 2. PRELIMINARIES
24
follow circuitous rounds such as roundabouts [91].
Before we can use the Fast Marching Method to compute an approximation of the solution
to the nonlinear Eikonal equation (2.1), the two-dimensional virtual environment is meshed into a
rectangular orthogonal mesh with N grid cells. Note that the scalar field φ is stored inside each grid
cell, whereas the anisotropic field C is stored at each face between two neighboring grid cells. When
computing a anisotropic field (e.g., C), we have to iterate over each grid cell and then over each of
the four faces of the grid cell. For example, when computing C for grid cell M in Fig. 2.1, we iterate
over the grid cell’s four faces to compute CM→i , where i ∈ {N, S,W, E}. Note that other scalar fields
and anisotropic fields in the figure are used by the continuum model.
g, φ
N
W
M
E
S
fM→E ,CM→E , fE→M ,CE→M , ∇φ
Figure 2.1: Discretized grid structure [91], where the scalar fields g and φ are stored inside each
grid cell, whereas the anisotropic fields such as f , C, and ∇φ are stored at each face between two
neighboring grid cells. The fields f , g, and C are set in Section 2.2, whereas φ is the solution to (2.1)
computed using the FMM.
Suppose that we want to solve the Eikonal equation (2.1) for cell M in Fig. 2.1, we compute φM
using the finite difference approximation to (2.1) (see [91]):
φM − φmx
CM→mx
2
φM − φmy
+
CM→my
2
=1
(2.4)
where mx and my represent the grid cells in the upwind direction (i.e., they are the less costly adjacent
grid cells (of cell M) along the x- and y-axes, respectively).
mx = arg min{φi +CM→i }, my = arg min{φi +CM→i }
i∈{W,E}
i∈{N,S}
(2.5)
CHAPTER 2. PRELIMINARIES
25
The x-dimension (or y-dimension) is dropped from (2.4), if mx ’s both neighbors (or my ’s both neighbors) have infinite cost and consequently not defined.
Since the finite difference approximation in (2.4) is an upwind approximation, the solution at cell
M (i.e., φM ) depends only on the smaller adjacent values. This causality relationship is the key to the
efficiency of the Fast Marching Method because this relationship allows us to build the solution in
the order of increasing values of φ . Once φM is set, the gradient ∇φ is simply the difference between
φM and the potentials at the neighboring grid cells in the upwind direction.
The Fast Marching Method is described in Algorithm 1. An efficient mini-heap structure is used
by the FMM to find the CANDIDATE cell with the lowest value of φ . Given a heap with N elements,
the mini-heap structure can change any element and reorder the heap in O(log N) steps. Since it
takes N steps to touch all N grid cells, where each step takes O(log N), the computation efficiency
of the Fast Marching Method is O(N log N).
Algorithm 1: The Fast Marching Method
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
1.10
Assign φ the value of 0 inside the agent’s goal gb and tag the grid cells in the goal as
KNOWN;
Assign the value of ∞ to all other grid cells and tag those cells as UNKNOWN;
Tag the UNKNOWN cells adjacent to all KNOWN cells as CANDIDATE cells;
Compute φ of those newly tagged CANDIDATE cells by solving a finite difference
approximation to the Eikonal equation (2.1);
repeat
Tag the CANDIDATE cell with the lowest value of φ as TRIAL;
Add all UNKNOWN cells adjacent to the TRIAL cell to the CANDIDATE set, then
remove them from the UNKNOWN set;
Add the TRIAL cell to the KNOWN set, then remove it from the CANDIDATE set;
Recompute the values of φ at all CANDIDATE cells adjacent to the TRIAL cell;
until all grid cells are KNOWN ;
The Fast Marching Method is very similar to Dijkstra’s algorithm [20], which is a graph search
algorithm for computing shortest paths on a discrete graph. Both the FMM and Dijkstra’s algorithm
propagate the values in the same order: Dijkstra’s algorithm also keeps track of the “current smallest
cost” for reaching a graph vertex and uses it to update the adjacent graph vertices that are directly
connected to the graph vertex with the smallest cost by graph edges. However, the FMM exploits
this idea in the context of an approximation to the underlying partial differential equation and uses
an update formula that is consistent with the underlying continuous state space. For example, paths
generated by Dijkstra’s algorithm are restricted to graph edges, whereas paths generated by the FMM
CHAPTER 2. PRELIMINARIES
26
can pass on mesh edges. Thus, the FMM tends to produce shorter paths than Dijkstra’s algorithm
(e.g., the FMM is more accurate for the Euclidean norm) [1].
2.2 The Continuum Model
Given the unit cost field C, the Fast Marching Method computes the potential φ in O(N log N), where
N is the number of grid cells. An agent can then move from anywhere (not just its initial position
xa ) in the virtual environment in the direction opposite the gradient ∇φ until it reaches the goal gb
(given as a collection of grid cells in [91]), because potentials generated by the FMM are free of
local minima analytically. Thus, a group of agents can share the same potential field as long as they
all have the same goal. This is utilized by the continuum model [91] to plan motions of a crowd of
agents.
In the continuum model, the unit cost field C in [91] is chosen in such a way that the optimal
path of the agent minimizes a linear combination of 1) path length, 2) time to the goal gb , and 3)
discomfort per time unit along the path, that is,
C = α +β
1
g
+γ
f
f
(2.6)
where α , β , and γ are weights, f is the speed field, and g is the discomfort field. Both fields are
user assigned as follows. The discomfort field g is a scalar field. Given two positions x1 and x2
and the discomforts g(x1 ) and g(x2 ), where g(x1 ) < g(x2 ), an agent prefers the position with the
lower discomfort (i.e. x1 ), all other things being equal. For example, a discomfort is added to the
front of each agent so that two agents anticipate one other when they cross. The speed field f is an
anisotropic field and its value depends not only on the terrain, but also on the density of the agents
in the neighborhood. At low density, f depends only on the terrain and is equal to the topographical
speed fT . When the density of the agents in the neighborhood increases, f becomes more and more
dominated by the movements of the neighboring agents.
To simulate motions of a crowd of agents, the continuum model first divides the agents into a
few groups before it constructs a unit cost field C and then computes a single dynamic potential
φ for each group in each simulation cycle by solving the Eikonal equation (2.1) using the FMM.
An optimal path for each agent can then be determined by backtracking from any position (e.g., its
initial position xa ) to its goal gb by moving opposite the gradient of the potential function ∇φ (x)
scaled by the speed at that point:
CHAPTER 2. PRELIMINARIES
27
ẋ = − f (x, θ )
∇φ (x)
k∇φ (x)k
(2.7)
where ẋ and f (x, θ ) denote the velocity and the speed evaluated in the direction of motion θ ∈
{N, S,W, E}, respectively. Because speed f and discomfort g of one group affect all other groups,
motions of agents in different groups are coupled.
The continuum model for crowd simulation is outlined in Algorithm 2. Note that the last step
(i.e., minimum distance enforcement) is necessary because the continuum model without the minimum distance enforcement step can only ensure that no two agents intersect up to the resolution of
the grid, and therefore two agents may collide if they are located in the same grid cell. To enforce a
pair-wise minimum distance between the agents, the continuum model simply iterates over all pairs
within a threshold distance and pushes them apart.
Algorithm 2: The Continuum Model for Crowd Simulation
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
2.9
foreach simulation cycle do
Construct the density field;
foreach group do
Construct the unit cost field C;
Construct the potential φ and its gradient ∇φ ;
Update agents’ locations;
end
Enforce the minimum distance between the agents;
end
Chapter 3
Motion Planning in Environments with
Narrow Passages
The continuum model [91] can plan motions of multiple agents at interactive rates, but it may fail
to generate collision-free paths due to deadlocks in certain constrained situations (e.g., in narrow
passages) as shown in Fig. 1.1b where two agents are in deadlock in the narrow passage. In this
chapter, we combine the continuum model with coordination graphs (CG) [34, 50] by designing
and incorporating rules into the coordination graphs to coordinate motions of agents at runtime
and locally to avoid deadlocks in constrained regions, such as narrow passages. These rules are
easily interpretable and very flexible (i.e., existing rules can be easily removed and new rules can
be easily added). Because we have to process multiple coordination graphs in real-time in order
to obtain optimal joint actions for deadlock avoidance, we speedup the computation in this chapter
by processing the graphs in parallel on Symmetric Multiprocessing (SMP) systems. Our current
implementation can coordinate motions of about ten agents in real-time on the PC.
This chapter is organized as follows. We formally define the problem to be solved in Section 3.1.
We explain the concept the continuum model in Section 3.2. The overall solution is presented
in Section 3.3. We explain in Section 3.4 how to extract information (i.e., open spaces, narrow
passages, and entrances) from a given environment. Coordination graphs are used in Section 3.5 to
coordination motions of the agents for deadlock avoidance. A parallel procedure for construction
of multiple coordination graphs and computation of multiple optimal joint actions is presented in
Section 3.6. We explain also how to decouple the rendering from the planning in that section. In
Section 3.7, we describe the experiments, and the results obtained. We conclude in Section 3.8.
28
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
29
3.1 Problem Definition
Let k groups G1 , . . . , Gk of robot agents be in a static two-dimensional environment (given as a
binary occupancy grid), where each agent has three degrees of freedom (two for translation and
one for rotation) and the radius of the bounding circle for the agent is r. The agents in each group
have different initial positions, but share the same goal (given as a collection of grid cells). We
assume that the environment/workspace consists of open spaces and narrow passages that connect
the open spaces to each other and hence we do not consider workspaces that consist solely of
narrow passages (e.g., mazes). We define a narrow passage as region where width is such that two
agents cannot pass side by side. In our implementation, we assume that the width of a grid cell is
less than 4r. Hence, a passage is considered narrow if it is one grid cell wide (this can be easily
adapted for more general cases though). As shown in Fig. 3.1, we consider four different types
of narrow passages in this thesis: one lane passage, 3-way intersection, 4-way intersection, and
circular intersection/roundabout. The task is to plan for each agent, in real-time and with a very
short (a couple of seconds) preprocessing phase, a path that takes the agent from its initial position
to its goal without colliding with other agents and static obstacles. Note that a short preprocessing
phase is essential for motion planning in computer games, because virtual environments in games are
often generated automatically during the preprocessing phase and game players may only tolerate a
few seconds of delay.
Figure 3.1: Narrow passages (from left to right): one lane passage (e.g., one lane bridge), 3-way
intersection (e.g., T intersection, Y intersection), 4-way intersection (i.e., crossroad), and circular
intersection (i.e., roundabout).
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
30
3.2 Background
3.2.1 Coordination Graphs
Suppose we have a collection of agents A = {A1 , . . . , Am }. All agents are acting in a space described
by a set of discrete state variables, X = {X1 , . . . , Xn }. A state x = {x1 , . . . , xn } is an assignment
to each state variable Xi . Each agent A j chooses an action a j from a finite set of possible actions
Dom(A j ). We want to select an optimal joint action a = {a1 , . . . , am } that maximizes the total utility
(or value function) Q = ∑ j Q j (x, a), where Q j (x, a) is agent A j ’s local value function [33]. The
local value function Q j (x, a) consists of a set of value rules. A value rule describes a context — an
assignment to state variables and actions — and a value increment (positive or negative reward). If
a context applies, the corresponding value increment is added to the total utility. In this chapter, all
action and state variables are binary variables. Negates of a and x are denoted as ā (or ¬a) and x̄ (or
¬x), respectively.
Each node of a coordination graph represents one agent. There is a local value function for each
agent. Local value function Q j is influenced by action of agent A j and possibly other agents. If
agent Ai influences agent A j ’s local value function Q j , then node j has an incoming edge from node
i. Agent A j is the child agent and agent Ai is the parent agent. This means that agent A j has to
coordinate its action with agent Ai . A coordination graph captures local coordination requirements
between agents, because two agents need to coordinate their actions if and only if the corresponding
nodes are interconnected.
A sample coordination graph for a coordination problem with 4 agents is shown in Fig. 3.2.
Agent A1 has to coordinate with agents A2 , A3 , and A4 . Since node 2 and node 3 are not connected
by an edge, agents A2 and A3 do not need to coordinate with each other. Agents A3 and A4 do
not need to coordinate with each other either. The coordination dependencies are represented by
directed edges. For example, node 2 is the child and node 1 is the parent, implying that decisions
made by agent A1 affect agent A2 .
For the example in Fig. 3.2, agent A1 ’s local value function Q1 is
ha1 ∧ a3 ∧ x : −100i
ha1 ∧ a4 ∧ x̄ : 100i
where a1 , a3 , and a4 are actions of agents A1 , A3 , respective A4 and x is a state. Actions of agents
A3 and A4 affect agent A1 , therefore there are two incoming edges to node 1, one from node 3, and
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
1
2
3
4
31
Figure 3.2: Coordination graph for a coordination problem with 4 agents.
the other from node 4. If agent A1 observes that the current state is x, the second value rule does not
apply anymore and can be removed. This leaves us with only the first value rule and it states that the
total utility will be reduced by 100 if a1 = true and a3 = true.
To find an optimal joint action, we delete all value rules which do not apply after the current
states have been observed. An efficient variable elimination algorithm is then used to find an optimal
joint action of the agents in combination with a message passing scheme [34]. Nodes are eliminated
one by one from the graph. Each node collects all rules that involve it from its neighbors and
computes its optimal conditional strategy. Then the optimal conditional strategy is distributed to the
node’s parents. The elimination order does not affect the result (i.e., optimal joint action). When the
last node is removed, a second pass is performed in the reversed order where each node distributes
its decision to its neighbors and this enables the neighbors to fix their final strategies. During the
process, some new rules are introduced. The cost of the whole algorithm is polynomial in the
number of new rules generated [33]. Note that the variable elimination algorithm is an exact method
that always reports the optimal joint action that maximizes the total utility, even if the coordination
graph has cycles [49]. However, for connected graphs with cycles, the worst-case complexity of
the variable elimination algorithm is exponential in the number of nodes [49]. We refer the reader
to [34, 49] for details on computing optimal joint actions using the variable elimination algorithm.
3.3 Overall Solution
The overall motion planning algorithm that combines the continuum model with coordination graphs
is given in Algorithm 3. Recall that we have to enforce the minimum distance between two agents
because the continuum model only guarantees that they do not intersect if they are located in two
different grid cells.
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
32
Algorithm 3: Motion Planning of Multiple Agents in Static Environments with Narrow
Passages
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
3.10
3.11
3.12
3.13
3.14
/* Preprocessing
Identify all open spaces, narrow passages, and entrances;
/* Runtime
foreach update cycle do
forall groups do
Construct the unit cost field C;
Construct the potential φ and its gradient ∇φ ;
end
forall agents do
Observe the agent’s state;
end
Construct coordination graphs and compute optimal joint actions;
Update the agents’ locations;
Enforce the minimum distance between agents;
Render in 3D;
end
*/
*/
3.4 Information Extraction from Binary Occupancy Grids
We model the environment as a binary occupancy grid (i.e., the grid cells have values in {0, 1}). The
grid cells that have value 0 represent free areas, whereas the grid cells that have value 1 represent
obstacles. We use a slightly modified version of the topology-based maps extraction technique —
a combination of morphological operations and morphological watersheds [28] — proposed in [22]
to extract information from a grid (i.e., identify open spaces, narrow passages, and entrances to the
narrow passages). It essentially works as follows. First, we apply a morphological closing operation
to the binary occupancy grid that represents the environment. Denote the grid as I, then the closing
of I by a structural element K is the erosion of the dilation of I,
I • K = (I ⊕ K) ⊖ K
(3.1)
where ⊕ and ⊖ denote the dilation and erosion, respectively. This results in closing all narrow
passages and separating the free space in the environment into distinct connected components of
open spaces, which are identified by using the region growing [28] procedure. Narrow passages are
then determined by appropriate difference operations over these computed maps.
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
33
We choose a 2 × 2 structural element K for both dilation and erosion operations:

K=
1 1
1 1


(3.2)
The environment in Fig. 3.3a has three open spaces connected by two narrow passages. The narrow passage on the left hand side has three entrances, and the one on the right hand side has two
entrances. We first compute the dilation D of I by K (i.e., D = I ⊕ K) which closes all narrow
passages and creates three separate open spaces (Fig. 3.3b). Note that some cells in open spaces
are also marked as obstacles by the dilation step. Next, we compute the erosion E of D by K (i.e.,
E = D ⊖ K) to remark those cells as free (Fig. 3.3c). Observe that the narrow passages are still
closed in Fig. 3.3c. Both dilation and erosion take O(N) time, where N is the number of grid cells.
In the erosion E of D, only grid cells belonging to open spaces are marked as free. To distinguish
the three open spaces from each other, we use the region growing procedure by starting with a set
of “seed” grid cells chosen randomly from the black cells in Fig. 3.3c and from them grow three
regions by appending to the seeds those neighboring grid cells that have the same gray level (i.e.,
black) as the seeds. The free grid cells in Fig. 3.3a, that do not belong to the open spaces, belong of
course to one of the two narrow passages (Fig. 3.3e), and they can be easily identified by performing
difference operation on maps I (Fig. 3.3a) and E (Fig. 3.3c).
To identify all entrances to a narrow passage, we consider the narrow passage’s neighboring
open spaces in turn. For a pair of narrow passage and open space, we first find the grid cell ps in
narrow passage (note that we consider a passage narrow if it is one grid cell wide) that shares a
common side with one of the grid cells in the open space. The entrance to the narrow passage is
the set of the open space grid cells inside a disk with center ps and radius ε > 0 (we set ε to 5 grid
cells). We allow entrances to intersect, because each entrance is uniquely defined by a pair of narrow
passage and open space. For example, among the five entrances shown in Fig. 3.3f, two entrances
intersect each other and share some common (marked with white) grid cells, but those two entrances
belong to two different narrow passages.
An environment with a roundabout is shown in Fig. 3.4a. We can easily identify the four open
spaces, the four entrances, and the single narrow passage using the mathematical morphology and
the region growing procedure as outlined above. The computed single narrow passage is shown in
Fig. 3.4b and it consists of a square ring and two additional grid cells at each side of the square ring
that connect the square ring to one of the four open spaces. To check whether the narrow passage
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
34
is a roundabout, we find an axis-aligned bounding box (AABB) that bounds the narrow passage.
Using the same approach we used to identify the open spaces, we segment the non-narrow passage
grid cells inside the AABB into (five) connected components of grid cells. For each connected
component, we check whether a grid cell in that connected component shares a common side with a
grid cell in the AABB. If none of the grid cells in the connected component is in the neighborhood
of the AABB, the narrow passage is a roundabout. For example, the narrow passage in Fig. 3.4b is
identified as a roundabout because the grid cells inside the square ring in Fig. 3.4b are surrounded
by the narrow passage and they do not share a common side with any grid cells in the AABB.
We briefly mention how we set the topographical speed fT here. Since we assume that each grid
cell represents either an obstacle or a flat free space, fT in this chapter is either free speed f f ree or
0, where f f ree > 0. Recall that fT is an anisotropic field and it is stored at each face between two
neighboring grid cells. When setting fT , we iterate over each grid cell and then over each of the
four faces of the grid cell. fT for one face is set to f f ree if and only if both the grid cell and the
neighboring grid cell represent free space, otherwise it is set to 0. In addition, fT is used to force
agents to follow the traffic flow (clockwise or counterclockwise) inside a roundabout by setting fT
for the face of each roundabout grid cell that faces the opposite direction of the flow to 0.
3.5 Motion Coordination with Coordination Graphs
As mentioned in the introduction, deadlocks are avoided via “traffic control” using coordination
graphs at the entrance to narrow passages via “imaginary traffic lights”. The status of lights at all
the entrances to the same narrow passage is coordinated so that at one time, only one of these lights
is green. A robot agent at an entrance is only allowed to enter the narrow passage if the traffic light
at that entrance is green. If there are multiple agents at the entrance, the closest one to the entrance
is allowed to enter the narrow passage. The rest of the agents at the entrance must wait (i.e., we stop
these agents by setting their velocities to zero). This is implemented via the value rules associated
with each coordination graph as explained below.
3.5.1 Construction of Coordination Graphs
For each narrow passage, we create one coordination graph for controlling the “traffic lights” and
one coordination graph per entrance for controlling motions of agents. So, for a narrow passage
with Ne entrances, we will have Ne + 1 coordination graphs in total.
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
35
Coordination Graph for Traffic Lights
Given a narrow passage, the imaginary traffic light placed at ith entrance of a narrow passage is
denoted by Ai , and is controlled as follows.
It has one boolean action ai :
• turn green(i): it changes the color of the traffic light to green. ¬turn green(i) indicates that
the color is switched to red.
There are two boolean state variables associated with it:
• is green(i), indicates that the color of the traffic light at entrance i is green. ¬is green(i)
indicates that the traffic light is red.
• entrance is empty(i), indicates the entrance i is empty. Observe that only agents that are
heading toward the narrow passage (easily determined by following opposite the gradient of
the potential field generated by the FMM) connected to the entrance i are considered. If
all agents in the entrance i are moving toward the neighboring open space, the entrance is
considered to be empty.
In addition, there is one boolean state variable associated with the narrow passage connected to
all its entrances, denoted by narrow passage is empty, which indicates that the narrow passage is
empty.
These action and state variables are then used to define Ai ’s local value function Qi as follows:


hp1 ; ai = ¬turn green(i) : 10i







hp2 ; ai = turn green(i) ∧ is green(i) : 100i






hp3 ; ai = turn green(i) ∧



a j = ¬turn green( j) ∧
Qi (x, a) =




¬entrance is empty(i) ∧







narrow passage is empty :






1000N i−1 i ∀ j 6= i
(3.3)
e
Qi consists of three value rules (i.e., p1 , p2 , and p3 ) which specify the contribution to the total utility
given a specific context. The first rule indicates ¬turn green (i.e., turn red) is the default action, and
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
36
hence low value increment. The second rule indicates that the traffic light at entrance i remains green
if it is already green. The third rule turns the traffic light at entrance i to green and the traffic lights
at all other entrances to the same narrow passage (i.e., j, ∀ j 6= i) to red when the narrow passage is
empty and entrance i is not empty. Note that the value increment in rule p3 is chosen so that when
the narrow passage is empty and more than one entrance are occupied, only the traffic light at the
entrance with the highest ID number 1 is set to green, and all others are set to red.
Coordination Graph for Controlling Robot Agents in an Entrance
We control motions of only those agents who are moving toward the narrow passage (easily determined by following opposite the gradient of the potential field given by the FMM from each agent’s
current position until we reach the narrow passage or an open space). Consequently, agents who are
moving away from the narrow passage will not be controlled by the coordination graph.
For each robot agent Ak that is moving toward the narrow passage in entrance i, there is one
boolean action:
• enter(k): Ak is allowed to move toward the narrow passage. ¬enter(k) indicates that Ak is not
allowed to move forward and must wait.
A boolean state variable is also defined:
• closest to narrow passage(k), indicates that Ak is the closest one to the narrow passage.
For Ak , its local value function Qk is defined as
Qk (x, a) =


hp1 ; ak = ¬enter(k) : 100i





 hp2 ; ak = enter(k) ∧







(3.4)
closest to narrow passage(k) ∧
is green(i) : 200i
The first rule indicates that Ak is not allowed to move toward the narrow passage (i.e., it must wait)
by default. However, if Ak is the closest one to the narrow passage and the traffic light at the entrance
is green, the second rule overrides the first on and allows Ak to move toward the narrow passage.
1 Other
criterions could be used instead of the ID number.
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
37
When the narrow passage is a roundabout, there are no traffic lights placed at the entrances
to the roundabout. Instead, a robot agent has to yield for the traffic inside the roundabout. To
handle this situation, we replace the state variable is green in rule p2 with no traffic on left (or
no traffic on right, depending on the direction of the traffic flow inside the roundabout).
3.5.2 Computation of Optimal Joint Actions
Once all local value functions have been generated (i.e., Ne + 1 coordination graphs in total for each
narrow passage: first one coordination graph for controlling all the traffic lights and then one coordination graph per entrance for controlling motions of robot agents), each agent determines its
current state and instantiates the current state on its local value function by discarding all rules that
are not consistent with the current state. The optimal joint action for the traffic lights is determined
first (by running the variable elimination algorithm on the coordination graph for the traffic lights),
followed by determining the optimal joint action for the robot agents (by running the variable elimination algorithm on the Ne coordination graphs for the robot agents, one at a time, the order being
immaterial).
Suppose that a narrow passage has two entrances and consequently two traffic lights A1 and
A2 . Assume that the narrow passage is empty (i.e., narrow passage is empty), neither entrances is
empty (i.e., ¬entrance is empty(1) and ¬entrance is empty(2)), and only traffic light A1 is green
(i.e., is green(1) and ¬is green(2)), then the traffic lights’ local value functions Q1 and Q2 become:
Q1 (x, a) =


hp1 ; a1 = ¬turn green(1) : 10i





 hp2 ; a1 = turn green(1) : 100i

hp3 ; a1 = turn green(1) ∧






a2 = ¬turn green(2) : 1000i


hp1 ; a2 = ¬turn green(2) : 10i



hp3 ; a2 = turn green(2) ∧
Q2 (x, a) =




a1 = ¬turn green(1) : 2000i
(3.5)
(3.6)
Now an optimal joint action for the traffic lights can be computed, as mentioned earlier, using
a variable elimination algorithm in combination with a message passing scheme. The optimal joint
action for the example above is {ā1 , a2 } (i.e., only traffic light A2 is turned to green). Optimal joint
actions for robot agents in the entrances of the narrow passage are computed in the same way.
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
38
3.5.3 Deadlock Free Optimal Joint Actions
From local value functions (3.3) for traffic lights and local value functions (3.4) for robot agents, we
can easily prove that optimal joint actions of the traffic lights and the robot agents guarantee that the
robot agents do not get stuck in a narrow passage due to deadlocks.
Theorem 3.5.1. Given a narrow passage, optimal joint actions of its traffic lights (with local value
function Qi (3.3)) and robot agents (with local value function Qk (3.4)) avoid deadlocks in the narrow
passage.
Proof. Assume that the narrow passage is empty and at least one of the Ne entrances are not empty,
then the third rule in (3.3) applies (for traffic lights at these non-empty entrances) and the corresponding value increments are 1000Nene −1 : ne ∈ [1, Ne ], where ne denotes the IDs of the non-empty
entrances. Let h = max(nE ). If h = 1 (i.e., there is only one non-empty entrance and its ID is equal
to 1), the entrance h = 1’s value increment is equal to 1000 and it clearly dominates the value increments from the first two rules. For h > 1 (i.e., there is at least one non-empty entrance and its ID
is greater than 1), the entrance h’s value increment is also greater than the sum of all other possibly
κ
non-empty entrances’ value increments, because Neh−1 > ∑h−2
κ =0 Ne (this can be easily derived from
Geometric series [72]). Consequently, traffic light at entrance h is set to green while traffic lights at
all other entrances are set to red (i.e., one and only one traffic light is switched to green) to maximize
the total utility (i.e., this action is optimal). Since the default action for a traffic light is turning to
red (the first rule in (3.3)) and it remains green if it is already green (the second rule in (3.3)), the
three rules in (3.3) guarantee that at most one traffic light at a certain time is green and it can only
be switched to green from red if the narrow passage is empty. Furthermore, when traffic light at an
entrance is green, multiple robot agents can enter from this entrance one by one (moving in the same
direction since they are all entering from the same entrance), because the two rules in (3.4)) ensure
that one and only one robot agent at the entrance is allowed to enter at one time. Consequently,
optimal joint actions of the traffic lights and the robot agents ensure that the robot agents do not get
stuck in the narrow passage due to deadlocks.
3.6 Parallel Processing
The most expensive step in Algorithm 3 is step 3.10, because we may have to process multiple
CG tasks, where each CG task constitutes constructing a coordination graph and then performing
the variable elimination algorithm to compute an optimal joint action in each update cycle. For
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
39
processing more agents in real-time, we process multiple CG tasks in parallel on a Symmetric Multiprocessing (SMP) system in this section.
3.6.1 Supervisor-Worker Paradigm
We implemented the task parallelism in a supervisor-worker paradigm: a single supervisor, called
master, asks multiple workers, called slaves, to perform the CG tasks.
The supervisor-worker paradigm can be implemented with either threads or processes. Threads
should be used when the same complex data structures must be processed concurrently, and processes should be used instead for less tightly coupled applications [75]. Therefore, we chose processes for implementation of the supervisor-worker paradigm, because all workers perform their
tasks independently of one other and no data is passed between workers. Because creating processes costs more than creating threads, we create and destroy processes only when the supervisor
and the workers initialize and terminate, respectively; hence no processes are created or destroyed
during runtime. Another advantage of processes over threads is that developing and testing processes separately is easier. However, since each process has its own set of memory pages, we have
to use Interprocess Communication to let processes communicate with each other. We use System
V IPC for interprocess communication, in particular message queues and shared memory segments.
As shown in Fig. 3.5, the processes are grouped into three groups: the rendering process, the
supervisor processes, and the worker processes. We decouple also the rendering (step 3.13 in Algorithm 3) from the other steps in Algorithm 3 to ensure interactive frame rates. The supervisor
processes consist of a planner process and a message receiving process. All worker processes are
identical and they communicate with the supervisor processes through two message queues: the
supervisor sends messages to the workers through message queue A, and the workers send back the
results through message queue B.
In each update cycle, the planner process observes all agent’s states (step 3.7 in Algorithm 3)
as soon as it has computed all group’s potentials and gradients using the FMM (step 3.3 in Algorithm 3). The planner process stores all agents’ states inside multiple messages before the messages
are appended to the message queue A. Once all messages are sent to the worker processes, the planner process moves on to the next step. As soon as a worker process is free, it pops the first message
in the message queue A. Using the data stored inside the message, the worker process performs
one CG task from step 3.10, and sends back the corresponding optimal joint action to the message
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
40
receiving process of the supervisor through the message queue B. When the message receiving process pops a message in the message queue B, it writes the data (i.e., an optimal joint action) in the
message into the same memory it shares with the planner process. The shared data are only written by one process (i.e., the message receiving process); hence, there is no need to use semaphores
for restricting access to the data. Similarly, the planner process passes the agents’ locations to the
rendering process (for rendering using OGRE [90]) via the memory shared by the two processes.
3.6.2 Job Scheduling
n CG tasks are performed in each update cycle. A CG task can only be processed by one processor,
and a CG task cannot be interrupted. All processors available for processing are identical. We want
to minimize the length of time denoted by M required to complete all CG tasks. This is a classical
scheduling problem of parallel identical processors and independent jobs (tasks) [2]. Since this
problem is NP-hard [10], we use a fast and effective heuristic procedure — Longest Processing
Time (LPT) [2, 10] — instead. The time complexity of the LPT is O(n log n) [10]. The absolute
performance ratio RLPT for the approximation algorithm LPT is
RLPT =
4
1
−
3 3m
(3.7)
where m is the number of processors (i.e., an LPT schedule can be up to 33% longer than an optimal
schedule in the worst case) [10].
In general, processing time for a coordination graph grows with the number of nodes in it.
Therefore, an LPT ordering of the CG tasks can be obtained by sorting the coordination graphs
according to the number of nodes.
3.6.3 Asynchronous Message Delivery
With multiple processes running in parallel, once all messages are sent by the planner process (part
of the supervisor) to the worker processes, the planner process does not wait for the results from
the worker processes via the message receiving process. Instead, it moves on to the next step (i.e.,
step 3.11, where agents’ locations are updated, in Algorithm 3) from step 3.10, while the worker
processes compute optimal joint actions. This is called asynchronous message delivery. With it,
we can achieve higher parallel efficiency. However, on average, the worker processes still need to
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
41
compute optimal joint actions in less than about one-tenth of a second in order to avoid deadlocks
in the narrow passages.
During the simulation, the planner process maintains a table of boolean variables, with each
variable corresponding to a single agent. The size of the table is therefore equal to the number of
agents. The initial values of all table entries are true. Whenever an optimal joint action is received,
the planner process updates the entries of the corresponding agents with the values in the optimal
joint action. To prevent deadlocks, an agent’s velocity computed from the potential and the gradient
is reset to 0 (i.e., we change the velocity instantaneously and this amounts to an infinite acceleration)
if the agent’s entry contains the value false; hence the agent remains at its current location until the
value of the entry changes to true.
3.7 Experiments and Results
3.7.1 Hardware and Software Setup
The experiments were performed on two different systems: an SGI UltimateVision and a Dell OptiPlex GX620. The SGI UltimateVision has 24 MIPS R16000 processors and runs IRIX 6.5.28. Each
MIPS processor runs at 700 megahertz, and has 4 megabyte L2 cache. The system has 14 gigabytes
of global shared memory, and it is visible to all 24 processors. The Dell OptiPlex GX620 has one
Intel Pentium D Processor 820 with two execution cores running at 2.8GHz and each core having
1MB level 2 cache (2MB in total), one 256MB ATI Radeon X600 PCIe video card, 4 gigabytes
of RAM, and runs Red Hat Enterprise Linux (RHEL) 4. The code was written in ANSI C/C++
and compiled using GNU GCC 3.4.3 on the Dell OptiPlex GX620 and GNU GCC 3.3 on the SGI
UltimateVision.
We chose the SGI UltimateVision to measure the parallel efficiency of our approach (specifically
constructing and processing coordination graphs in parallel using the supervisor-worker paradigm),
because the SGI UltimateVision has 24 processors. However, we could not render efficiently in 3D
on the SGI UltimateVision because images/frames must be sent through a rather slow network to
the OptiPlex and displayed remotely. Consequently, no rendering was done when we performed
experiments on the SGI UltimateVision. Instead, the OptiPlex was used to test the usability of our
approach in real-time application (i.e., with rendering) even though it has only two processing cores.
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
Table 3.1: Runtime of one CG task.
CG Task Size (No. of CG nodes) 1 2
3
4
Time in msec
2 10 20 64
5
107
42
6
160
3.7.2 Parallel Performance Analysis
In this subsection, we investigate whether we can obtained significant, scalable (i.e., we want to be
able to process more coordination graphs in real-time by adding processors) speedups by constructing and processing coordination graphs in parallel using the supervisor-worker paradigm on the SGI
UltimateVision. An important parallel performance metric is speedup S, which is defined as
S(N p , Pp ) =
Tseq (N)
,
T (N p , Pp )
(3.8)
where N p is the size of the problem, Pp is the number of processors, Tseq is the runtime of the
sequential program, and T (P) is the runtime of the parallel program.
To measure the parallel efficiency, we disabled the rendering process in Fig. 3.5 (due to the slow
connection between the OptiPlex and the SGI UltimateVision) and replaced the planner process
with a test driver process that enables us to perform some experiments in a controlled environment
using the SGI UltimateVision. The test driver process generates jobs and send them to the worker
processes (i.e., it performs only step 3.10 in Algorithm 3), where a job consists of one or multiple
CG tasks. The size of the job varies not only with the number of the CG tasks, but also with the size
of each CG task, which is equal to the number of nodes of the coordination graph inside the CG task,
and it ranges from 1 to 6 in our experiments. The test driver generates a job with a certain number
of CG tasks, where the sizes of the CG tasks may be equal to one another or different, because we
wanted to measure how the runtime of one CG task varies with its size and investigate how its size
affects the speedup. To measure runtime, a timer is started before the test driver sends messages to
the workers through message queue A; it is stopped once the test driver receives all optimal joint
actions from the message receiving process.
First, we measured how the runtime of one CG task varies with the size of the CG task. For each
job, the test driver sent 40 CG tasks of the same size to the workers for processing. The average
runtime for 1 CG task is shown in Table 3.1.
Next, we investigated how the size of a CG task (i.e., the number of nodes in a coordination
graph) affects the speedup. Three different numbers of nodes were tested: 2, 4, and 6. For each test,
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
43
the test driver sent 40 CG tasks of equal size to the workers. Runtime for 1, 2, 5, 10, and 20 workers
is shown in Table 3.2 and Fig. 3.6. The speedups for coordination graphs with all three different
numbers (i.e., 2, 4, and 6) of nodes are sub-linear due to the communication overhead. The effect of
the communication overhead is especially evident when the jobs are small and distributed to many
processors (e.g., when 40 coordination graphs with 2 nodes are processed by 20 workers).
Table 3.2: Runtimes of 40 equal-size CG tasks.
No. of Processors (P)
1
2
5
10
Time in msec (2 nodes)
412
210
86
51
Time in msec (4 nodes) 2568 1279 521 268
Time in msec (6 nodes) 6326 3148 1272 647
20
33
149
338
Another factor affecting speedups is the load balance between different processors. Ideally each
processor should perform the same amount of work. Given multiple CG tasks with mixed sizes, we
used the LPT scheduler to distribute CG tasks evenly among the available processors for a good load
balance. We tested the effect of the LPT scheduler with 20, 30, and 40 CG tasks. The size of each
CG task was determined randomly by the test driver, and it ranged from 1 to 6. Each CG task was
performed first without the LPT scheduler, and then with the scheduler. Runtime (averaged over 10
runs) is shown in Table 3.3. Speedups are shown in Fig. 3.7.
Table 3.3: Runtimes of unequal-size CG tasks (with and without scheduling).
No. of Processors (P)
1
2
5
10
20
without scheduling
Time in msec (20 CG tasks) 1081 569 270 171 157
Time in msec (30 CG tasks) 1625 842 378 231 164
Time in msec (40 CG tasks) 2139 1098 482 290 194
with scheduling
Time in msec (20 CG tasks) 1079 525 223 155 150
Time in msec (30 CG tasks) 1620 812 332 184 153
Time in msec (40 CG tasks) 2139 1071 434 231 176
The data in Table 3.3 and Fig. 3.7 indicates that the parallel performance improves significantly
when the LPT scheduler is used. Observe that the speedups are limited by the processing time of the
biggest CG task (i.e., a CG task with size 6). Because it takes abut 160 msec (Table 3.1) to process
a CG task with size 6, multiple CG tasks can not be processed in less time than 160 msec regardless
of the number of processors used to process these CG tasks.
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
44
3.7.3 Usability in Real-Time Applications
We constructed a demo application that contains all components in Fig. 3.5 (i.e., rendering in 3D
using OGRE [90], the FMM based the continuum model, and deadlock avoidance using coordination
graphs) to test the usability of our approach in real-time application on the OptiPlex. The application
takes a static environment given as a grid and k groups G1 , . . . , Gk of agents as the input, where all
agents in each group share the same goal, though their initial positions are different.
In addition to the rendering process and the two supervisor processes (i.e., the planner process
and the message receiving process), we created two worker processes. Because the OptiPlex’s
single Pentium D processor has two cores, the five processes we created are simply multiplexed
over the two cores by the system. However, running with fewer processors than processes can
hinder performance [14]. We gave the planner process higher priority than the other processes by
setting the planner process’ and other processes’ nice values to 16 and 20, respectively. A process
with higher nice value runs at a lower priority [75].
We used the environments shown in Figs. 3.8 and 3.9 to test the runtime performance. Two
groups of agents were placed in the environments, where each group had four agents. Recall
that all agents in the same group share the same goal, but different initial positions. All figures
in Figs. 3.8 and 3.9 were drawn in 2D for clarity using the data collected during the 3D simulations. The environment in Fig. 3.8 contained a single narrow passage with three entrances;
hence four coordination graphs were constructed and processed in each update cycle during the
simulation. The single narrow passage in the environment in Fig. 3.9 is a roundabout; hence
the same number (four) of coordination graphs (one for each entrance) were constructed and processed in each update cycle. By combining the continuum model and coordination graphs, we were
able to avoid deadlocks inside the narrow passages in Figs. 3.8 and 3.9. For example, Figs. 3.8b
and 3.8c show that agents #5 and #6 waited until agents #1 and #2 had exited from the narrow passage before they entered the narrow passaged (agent #6 first, followed by agent #5). In
Fig. 3.9, agents inside the roundabout have priority over the entering agents. For example, Figs. 3.9c
and 3.9d show that agent #5 waited outside the roundabout until agent #1 was no longer on its
left hand side (the traffic flowed counterclockwise inside the roundabout) before it entered the
roundabout. To enjoy the full visual impact, see the video accompanying this chapter (http:
//ramp.ensc.sfu.ca/people/liyi/LI_GUPTA_COORDINATION_VIDEO.mp4).
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
45
3.8 Conclusion
In this chapter, we showed how to combine the fast marching based continuum method with a
symbolic AI technique (i.e., coordination graphs) to plan in real-time motions of multiple agents
in static environments with narrow passages. The rules we designed for coordination graphs are
simple and intuitive, yet we were able to avoid deadlocks in narrow passages and achieve complex
behaviors such as agents’ behaviors inside roundabouts (i.e., follow the direction of the traffic flow).
In order to process multiple CG tasks in real-time, we proposed to process those tasks in parallel on
a SMP system. The task parallelism was implemented in a supervisor-worker paradigm with Unix
processes. The supervisor not only updates each agent’s position and orientation in each update
cycle, but also distributes jobs to the workers and receives results (i.e. optimal joint actions) from
the workers. A worker takes order from the supervisor, then constructs a coordination graph and
computes an optimal joint action.
We obtained significant, scalable speedups by constructing and processing coordination graphs
in parallel on the SGI UltimateVision with 24 processors. Unfortunately, we could not render efficiently in 3D on the SGI UltimateVision because images/frames must be sent through a rather slow
network to our dual-core PC and displayed remotely. Consequently, no rendering was done on the
SGI UltimateVision. However, we tested the usability of our approach in real-time application (i.e.,
with rendering) on the PC. By decoupling the rendering and the planning, we were able to render
at a higher frame rate than 24 fps on the PC. Our current implementation can coordinate motions of
about ten agents in real-time on the PC.
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
40
40
35
35
30
30
25
25
20
20
15
15
10
10
5
5
5
10
15
20
25
30
35
40
5
10
15
20
25
30
35
40
(b) After dilation (i.e., D = I ⊕ K).
(a) The environment (i.e., I).
40
40
35
35
30
30
25
25
20
20
15
15
10
10
5
5
5
10
15
20
25
30
35
40
5
(c) After erosion (i.e., E = D ⊖ K).
40
35
35
30
30
25
25
20
20
15
15
10
10
5
5
10
15
20
25
30
(e) The narrow passages.
35
15
20
25
30
35
40
35
40
(d) The open spaces.
40
5
10
40
5
10
15
20
25
30
(f) The entrances.
Figure 3.3: An environment with two narrow passages.
46
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
40
40
35
35
30
30
25
25
20
20
15
15
10
10
5
5
5
10
15
20
25
30
35
40
5
(a) The environment
10
15
20
25
30
35
47
40
(b) The roundabout.
Figure 3.4: An environment with one roundabout.
Planner Process
Rendering Process
(OGRE3D)
Shared Memory
OS
(FMM)
Data Sent
Message Queue A
Process No. 1
Shared Memory
Worker Processes (CGs)
OS
Message Receiving Process
Data Sent
Supervisor
Message Queue B
Figure 3.5: The rendering is decoupled from the supervisor and its workers. The processes communicate with each other through System V message queue and shared memory.
Speedups
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
6 nodes
4 nodes
2 nodes
1
2
3
4
5
6
7
8
9 10 11 12 13 14 15 16 17 18 19 20
No. of Processors
Figure 3.6: Speedups for 40 equal-size CG tasks.
14
13
12
11
10
Speedups
9
8
7
6
5
20 tasks without scheduling
30 tasks without scheduling
40 tasks without scheduling
20 tasks with scheduling
30 tasks with scheduling
40 tasks with scheduling
4
3
2
1
0
1
2
3
4
5
6
7
8
9 10 11 12 13 14 15 16 17 18 19 20
No. of Processors
Figure 3.7: Speedups for unequal-size CG tasks (with and without scheduling).
48
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
4
6
5
3
4
49
5
3
6
2
1
2
1
Sample No. 600
Sample No. 1000
(a)
(b)
2
1
2
1
4
4
5
3
3
6
5
6
Sample No. 1900
Sample No. 1500
(c)
2
(d)
2
1
1
4
3
3
4
5
6
Sample No. 2400
Sample No. 2900
(e)
5
6
(f)
Figure 3.8: Two groups of agents are moving in an environment with one narrow passage and three
entrances.
CHAPTER 3. MOTION PLANNING IN ENVIRONMENTS WITH NARROW PASSAGES
50
3
3
2
2
4
1
1
4
8
5
6
7
8
7
6
5
Sample No. 1000
Sample No. 500
(a)
(b)
3
3
2
2
1
5
5
1
4
6
6
8
7
Sample No. 1300
4
7
8
Sample No. 1500
(c)
(d)
4
1
7
3
4
6
2
6
2
5
7
1
3
5
8
8
Sample No. 2000
Sample No. 2500
(e)
(f)
Figure 3.9: Two groups of agents are moving in an environment with one roundabout and four
entrances. Agents must move counterclockwise inside the roundabout.
Chapter 4
Motion Planning of Multiple Agents
In this chapter, we propose an adaptive continuum model for real-time motion planing of multiple
agents with independent goals (i.e., each agent has its own goal) in a two dimensional dynamic virtual environment given as a occupancy grid. Our objective is to retain the advantages of the basic
continuum model, while allowing each agent to have its own independent goal (instead of sharing
the same goal with other agents). In our adaptive extension to the basic model, the potential field
computation (and the resulting path) for each agent is restricted to a channel [67], a subset of the
grid cells of the environment. This reduces the domain over which the potential field is constructed,
thereby significantly speeding up the computation. Next, we extend the adaptive continuum model
by constructing channels around backbone paths found at coarser resolution grids, and then planning motions of the agents at the original higher resolution grid. It intrinsically prefers open areas
because narrows passages may appear as blocked at the coarse levels. This is a desirable trait since
otherwise deadlocks may occur in narrow passages. Simulations show that that our adaptive multiresolution approach, while maintaining a real-time performance, (i) handles a significantly larger
number of individual agents with independent goals, (ii) handles bigger grids than the basic continuum model, and (iii) provides a natural way to steer agents from narrow passages to open spaces.
This chapter is organized as follows. The problem to be solved is formally defined in Section 4.1.
In Section 4.2, we present our adaptive continuum model for motion planning of multiple agents in
real-time, where each agent has its own goal. We extend the adaptive approach in Section 4.3 to
steer agents towards open spaces and away from narrow passages. We perform experiments with
multiple virtual environments of different sizes in Section 4.4 and conclude in Section 4.5.
51
CHAPTER 4. MOTION PLANNING OF MULTIPLE AGENTS
52
4.1 Problem Definition
Let agents a1 , . . . , ak be in a two dimensional dynamic virtual environment, where each agent is
modeled by a disc of radius r. The virtual environment is given as a binary occupancy grid, and
the motions of the dynamic obstacles are not known beforehand. In our application, an agent is
generally a few times smaller than a grid cell. The task is to plan for each agent, in real-time, a path
that takes the agent from its start position to its goal position without colliding with other agents and
obstacles.
4.2 The Adaptive Continuum Model
For each agent ai , where 1 ≤ i ≤ k, we want to compute its optimal path p∗i that takes ai from its
start position to its goal position while minimizing
R
p∗i Ci ds,
where unit cost field Ci depends on the
speed field fi and the discomfort field gi as shown in (2.6). Because we assume that a grid cell
represents either an obstacle or a flat free space, the topographical speed fT in this chapter is either
free speed f f ree or 0. When computing the speed field f , we iterate over each grid cell and then
over each of the four faces of the grid cell. The topographical speed fT for one face is set to f f ree
if and only if both the current grid cell and the neighboring grid cell represent free space, otherwise
it is set to 0. In addition, we increase discomforts at grid cells in the neighborhood of obstacles
to increase clearance. We refer the reader to the basic continuum model paper [91] for details on
constructions of the speed fields and the discomfort fields. Once the unit cost field Ci is set, we
compute the potential function φPi by solving the Eikonal equation (2.1) using the FMM, which is
the most expensive step in the basic continuum model [91] as mentioned in the introduction. In order
to achieve substantial speedups, we compute potential φPi and gradient ∇φPi over a channel (i.e., a a
subset of the grid cells) instead of the entire grid (see Fig. 4.1). Agent ai then moves in the direction
opposite the gradient ∇φPi scaled by the speed at the agent’s position. In each simulation cycle
(step 4.1 in Algorithm 4), all agents’ positions are updated. This is repeated until all agents reach
their goals. The algorithm is outlined in Algorithm 4. Note that Algorithm 4 iterates through all
agents instead of all groups as in [91] and the minimum distance between agents has to be enforced
because two agents in the same grid cell may collide [91].
To construct a channel for agent ai , we apply the continuum model over the entire grid and use
the unit cost field Ci to compute a backbone path pi by moving in the direction opposite the gradient
until we reach the goal of agent ai . Next, we grow pi by a given margin m to yield a channel Pi as
CHAPTER 4. MOTION PLANNING OF MULTIPLE AGENTS
53
Potential φ
Potential φ
600
60
500
50
60
400
350
50
300
400
40
40
250
300
30
200
20
200
30
150
20
100
100
10
10
20
30
40
50
60
0
10
50
10
20
30
40
50
60
Figure 4.1: Reducing the domain for potential constructions from all grid cells (left) in the virtual
environment to a channel (right).
Algorithm 4: The Adaptive Continuum Model
4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
4.9
foreach simulation cycle do
foreach agent ai do
Construct unit cost field Ci ;
Construct channel Pi (Algorithm 5);
Construct potential φPi and its gradient ∇φPi over channel Pi using the FMM;
end
Update the agents’ positions;
Enforce the minimum distance between agents;
end
follows. For a cell ui on the path pi , a cell vi is added to the channel Pi if the Manhattan distance
between ui and vi is less than m. Because the domain for potential constructions varies lineally with
m, the FMM computation can be speeded up by reducing m. However m should not be too small,
for in that case, agent ai may not be able to avoid collisions with other agents and obstacles in the
neighborhood of the backbone path pi . We set the value of m empirically. The computation of
channel Pi is outlined in Algorithm 5.
Because channel Pi (i.e., the domain for potential constructions for agent ai ) changes gradually
(e.g., it becomes shorter as the agent moves towards its goal), we update Pi (steps 5.7, 5.8, and 5.9 in
Algorithm 5) at a low frequency (i.e., 1/(k∆T ), where k is the number of agents and ∆T is the channel update interval) instead of once in each simulation cycle. The potential φPi and its gradient ∇φPi
CHAPTER 4. MOTION PLANNING OF MULTIPLE AGENTS
54
Algorithm 5: Channel Construction for Agent ai
input : unit cost field Ci , potential over channel Pi φPi
output: channel Pi
5.1 ∆T ← channel update interval (e.g., 0.5 sec);
5.2 m ← channel margin;
5.3 ti ← time when the latest update (of channel Pi ) event happened;
5.4 tc ← current time;
5.5 xi ← current position of agent ai ;
5.6 if (tc − ti ) > k∆T or φPi (xi ) is very high or φPi is not set then
Construct potential φi and its gradient ∇φi over the entire grid using the FMM;
5.7
5.8
Find backbone path pi by moving opposite the gradient ∇φi ;
5.9
Grow channel Pi along pi with margin m;
5.10 end
for agent ai are updated in each simulation cycle (Algorithm 4). Note that a channel update cycle
for the k agents (i.e., time needed to update all k channels because we need to construct a channel
for each agent) lasts k∆T sec. In order to achieve a smooth simulation, although not shown in the
pseudo code here, we distribute the updates of all k channels evenly over the channel update cycle.
However, Pi has to be updated immediately if agent ai is blocked by dynamic obstacle(s). When the
potential φPi (xi ), where xi is the position of agent ai , becomes suddenly very high (potential φPi is
zero at the goal position of agent ai ), it indicates that agent ai has been blocked by dynamic obstacle(s) (e.g., closed doors) and Pi becomes invalid. In that case, we update channel Pi for agent ai
immediately so that the agent bypasses the dynamic obstacle(s). Overall, the impact of Algorithm 5
on the average running time of Algorithm 4 is negligible because we run steps 5.7, 5.8, and 5.9 in
Algorithm 5 at a low frequency.
4.3 Extension: Multi-Resolution Channel Construction
In this section, we construct multi-resolution unit cost fields using the discrete wavelet transform to
steer agents into open spaces and away from narrow passages.
A one-dimensional data sequence S j for a given level j can be decomposed into a coarse resolution version S j+1 , with detail W j+1 using one pair of matrices A j and B j , known as a analysis
filters [85, 86].
CHAPTER 4. MOTION PLANNING OF MULTIPLE AGENTS
55
S j+1 = A j S j
(4.1)
W j+1 = B j S j
(4.2)
This procedure can be applied recursively to decompose the original data S j into a hierarchy of
coarser resolution versions S j+1 , S j+2 , . . . and details W j+1 ,W j+2 , . . .. Although we are only interested in the coarser resolution versions. In the unnormalized Haar basis, matrices A j , A j+1 , . . . and
B j , B j+1 , . . . represent the averaging and differencing operations. In addition, the lengths of coarser
resolution version sequence S j+1 and detail sequence W j+1 is halved compared to the data sequence
S j for particular level j. To compute the wavelet transform of a two dimensional data set, we generalize the Haar wavelet to two dimensions by applying the one-dimensional Haar wavelet transform
to each row of the original data set first, and then each column of the transformed rows [85, 86]. The
complexity of the wavelet transform is O(M), where M is the size of the original data set.
Now we describe how to compute a multi-resolution unit cost field using the 2D wavelet transform. We denote the unit cost field at resolution level l as Cl , where l ≥ 0, and higher value of
l represents coarser resolution levels, with l = 0 being the finest resolution. First we construct a
unit cost field over the virtual environment (given as a binary occupancy grid) as described in the
previous section and denote it as C0 . To compute Cl , where l > 0, we divide C0 into four equal sized
0 , and C 0 according to direction, because unit cost fields are anisotropic fields. For
sets CN0 , CS0 , CW
E
each set Ci0 , we apply the 2D wavelet transform on it to compute its coarser resolution versions Cil ,
where i ∈ {N, S,W, E}, l = 1 . . . Li , and Li is a suitable coarse level. Therefore, the unit cost field at
l , and C l .
resolution level l (i.e., Cl ) consists of CNl , CSl , CW
E
Next, we incorporate the multi-resolution unit cost field into Algorithm 5 and the result is outlined in Algorithm 6. Algorithm 4 is not changed, except that it calls Algorithm 6 instead of Algorithm 5 now. Note that unit cost field Ci in Algorithm 4 and unit cost field Ci0 in Algorithm 6 are the
same. In Algorithm 6, we need to choose a suitable resolution level Li . With increasing Li , “wider”
narrow passages will be blocked. If we fail to find path at level Li in Algorithm 6, we move down
to level Li − 1 which has higher resolution than Li and try again. This step is repeated until we find
a path, denoted by pLi i (assuming that one exists at level 0), and a channel Pi is constructed along
it. Therefore, we will not miss the paths that pass through narrow passages if these are the only
choices. Note that when the environment is particularly cluttered, the benefit of the multi-resolution
extension (i.e., steering agents away from narrow passages) is not always attainable. Observe that
CHAPTER 4. MOTION PLANNING OF MULTIPLE AGENTS
56
notations Pi , φPi , and ∇φPi in Algorithm 6 do not have any superscripts, because the continuum model
without the minimum distance enforcement step can only ensure that no two agents intersect up to
the resolution of the grid and hence we always construct channel Pi at level 0 even if the backbone
path it is constructed around was found at a coarser level.
Algorithm 6: Multi-Resolution Channel Construction for Agent ai
6.1
6.2
6.3
6.4
6.5
6.6
6.7
6.8
6.9
6.10
6.11
6.12
6.13
6.14
6.15
6.16
input : unit cost field Ci0 , potential over channel Pi φPi
output: channel Pi
∆T ← channel update interval (e.g., 0.5 sec);
m ← channel margin;
ti ← time when the latest update (of channel Pi ) event happened;
tc ← current time;
xi ← current position of agent i;
if (tc − ti ) > k∆T or φPi (xi ) is very high or φPi is not set then
Li ← a suitable resolution level;
for l = 1 to Li do
Construct Cil using wavelets;
end
repeat
Construct the potential φiLi and its gradient ∇φiLi over the entire level Li grid;
Find backbone path pLi i by moving opposite the gradient ∇φiLi , Li ← Li − 1 if
failed;
until path pLi i is found ;
Grow channel Pi along pLi i with margin m;
end
4.4 Experiments
We have performed a number of experiments to show the effectiveness of our adaptive multiresolution continuum model on a Dell OptiPlex GX620. The OptiPlex has one Intel Pentium D
Processor 820 with two execution cores running at 2.8GHz, one 256MB ATI Radeon X600 video
card, 4 gigabytes of RAM, and runs Red Hat Enterprise Linux (RHEL) 4. The code was written
in ANSI C/C++ and compiled using GNU GCC 3.4.3. All virtual environments and agents in the
experiments were rendered in 3D using OGRE [90] and in a separate process than the planning process [57]. Because the screenshots do not reproduce well on paper, all figures in this section were
redrawn in postscript using the data collected during the experiments.
CHAPTER 4. MOTION PLANNING OF MULTIPLE AGENTS
57
First, we simulated motions of 10, 20, and 40 agents on 64 × 64, 128 × 128, and 256 × 256 grids
to demonstrate the efficiency of our approach (we used ∆T = 0.5 sec and m = 4 cells for all agents in
all experiments) compared to the basic continuum model, where we ran each simulation for 60 sec
and the number of agents in each group modeled by the basic continuum model was restricted to one
(i.e., each agent has its own goal). In this thesis, all grid cells are squares. For 64 × 64 and 128 × 128
grids, each grid cell is 500 units wide. For 256 × 256 grids, each grid cell is 250 units wide. The
radius of all agents is 50 units. The update frequencies of the main loops in the basic continuum
model and our approach (i.e., step 4.1 in Algorithm 4) for these cases are shown in Table 4.1, where
we denote a path computed at level 0 using a channel constructed around a backbone path found
at level Li as a type Li 7→ 0 path. For example, 0 7→ 0 paths in Table 4.1 were computed using
channels constructed around backbone paths found at level 0 using Algorithm 5, whereas 1 7→ 0 and
2 7→ 0 paths were computed using channels constructed around backbone paths found at levels 1 and
2, respectively, using Algorithm 6. The data in Table 4.1 show that we have achieved substantial
speedups. For example, our approach is faster by a factor of 4 (i.e., it can perform 21 updates per sec
compared to less than 5 updates per sec using the basic continuum model) when planning motions
of 40 agents on a 64 × 64 grid. On 256 × 256 grids, the basic continuum model performed fewer
than one update per sec and resulted in sluggish simulations, whereas our approach speeded up
the computations by more than 8 times. Therefore, our approach can plan motions of more agents
with independent goals on bigger grids compared to the basic continuum model. Three virtual
environments (64 × 64 grids) and the paths computed by our approach are shown in Fig. 4.2, 4.3,
and 4.4, where the agents’ start positions and goal positions are marked as grey circles (green on
color prints) and black discs, respectively, along with their IDs and static obstacles are drawn in dark
grey (red on color prints).
The adaptive aspect of our approach is the main contributor to the speedups. Particularly, at
lower resolution grids, the contribution comes entirely from it. For example, for 64 × 64 and
128 × 128 grids, the speedups for 0 → 0, 1 → 0, and 2 → 0 cases are essentially the same. The
multi-resolution aspect of our approach makes only slight contribution to the speedups for higher
resolution grids (e.g., 256 × 256 grids). In these experiments, the multi-resolution aspect has less
impact on the speedups than the adaptive component because backbone paths are constructed at a
very low frequency.
The multi-resolution aspect of our approach has another benefit though; it steers agents away
from narrow passages to open spaces. This is desirable because otherwise deadlocks may occur
between agents moving through the same narrow passage. For example in Fig. 4.3, 2 → 0 path
CHAPTER 4. MOTION PLANNING OF MULTIPLE AGENTS
58
for agent 1 does not pass through the narrow passages marked by grey rectangles (yellow on color
prints). Instead, it takes a much longer route because those narrow passages appear to be blocked at
level 2. When no path is found at a coarse level (e.g., level 2), a backbone bath is searched for at a
higher-resolution level (i.e., level 0 or 1). For example, path for agent 12 passes through one of the
narrow passages because there is no 2 → 0 path for agent 12. Therefore, we will not miss the paths
that pass through narrow passages if these are the only choices.
Our adaptive multi-resolution continuum model handles not only static obstacles, but also dynamic obstacles and changes in environments such as door closing. For each agent, all other agents
are treated as dynamic obstacles. As shown in Fig. 4.4, agent 4 changed its course and took a detour
shortly after it left its start position marked by a grey circles (green on color prints), because its
channel became suddenly blocked by a dynamic obstacle marked by grey rectangles (cyan on color
prints) and a new channel was constructed for the agent immediately around a backbone path that
does not intersect the dynamic obstacle.
To enjoy the full visual impact, see the video accompanying this chapter (http://ramp.
ensc.sfu.ca/people/liyi/LI_GUPTA_ADAPTIVE_VIDEO.mp4).
4.5 Conclusion
We have presented an adaptive multi-resolution approach to the problem of motion planning of
multiple agents in two dimensional dynamic virtual environments. The main contribution of it is
that our approach can handle significantly larger number of agents with independent goals, while
retaining the advantages of the basic continuum model such as unified global planning and collision
avoidance. The key to the efficiency of our approach is that we restrict the computation of each
agent’s potential field to a channel, where the channel is constructed/updated a very low frequency
or whenever it is blocked by dynamic obstacle(s). As an intrinsic byproduct, our approach can steer
the agents away from narrow passages to open spaces (if desired), but it will not miss paths that pass
through narrow passages if they are the only options. The experiments show that our adaptive multiresolution continuum model can plan motions of a larger number of individual agents on larger grids
compared to the basic continuum model.
Our adaptive multi-resolution approach has a couple of limitations. The adaptive extension to
the basic model restricts the potential field computation for each agent to a channel, therefore the
resulting path may differ from the optimal one constructed by the basic model. Furthermore, the
benefit of the multi-resolution extension (i.e., steering agents away from narrow passages) may not
CHAPTER 4. MOTION PLANNING OF MULTIPLE AGENTS
59
always attainable when the environment is heavily cluttered with static/dynamic obstacles and even
agents. If all passages are narrow, then they will appear blocked at coarser resolutions and hence
one will have to go the the finest resolution and we loose the the benefit of the multi-resolution
extension.
17.89
8.99
4.52
4.30
2.16
1.08
0.99
0.49
0.25
10
20
40
10
20
40
10
20
40
64 × 64
128 × 128
256 × 256
Grid Size
8.06
4.24
2.08
30.96
15.02
7.62
94.34
42.02
21.37
8
9
8
7
7
7
5
5
5
8.40
4.44
2.20
31.35
15.17
7.79
94.34
42.55
21.65
8
9
9
7
7
7
5
5
5
8.47
4.46
2.23
31.15
15.04
7.74
94.34
44.44
22.08
Table 4.1: Speed comparison between the basic continuum model and our adaptive approach.
Basic Continuum
Our Adaptive multi-resolution Approach
No. of Agents
Model
0 → 0 Paths
Speedup
1 → 0 Paths
Speedup
2 → 0 Paths
(updates/sec)
(updates/sec) (rounded) (updates/sec) (rounded) (updates/sec)
8
9
9
7
7
7
5
5
5
Speedup
(rounded)
CHAPTER 4. MOTION PLANNING OF MULTIPLE AGENTS
60
CHAPTER 4. MOTION PLANNING OF MULTIPLE AGENTS
61
17
19
4
10
16
14
13
8
9
7
19
11
1
17
18
3
5
2
12
14
15
12
4
8
16
13
11
20
20
9
15
1
3
18
5
6
7
10
Sample No. 2000
2
6
Figure 4.2: 0 → 0 paths for 20 agents.
CHAPTER 4. MOTION PLANNING OF MULTIPLE AGENTS
62
10
9
11
5
4
6
8
1
7
12
4
3
3
11
2
2
9
1
10
6
7
8
5
12
Sample No. 3500
Figure 4.3: 2 → 0 paths for 12 agents in an environment with narrow passages.
CHAPTER 4. MOTION PLANNING OF MULTIPLE AGENTS
63
5
2
4
4
3
1
1
2
5
3
Sample No. 5750
Figure 4.4: 0 → 0 paths for 5 agents in an environment with dynamic obstacles.
Chapter 5
Motion Planning of Multiple Formations
In this chapter, we introduce a novel approach to the problem of coordinating multiple agents to
move in a tightly controlled formation in two dimensional virtual environments. Agents in a formation are conceived as being part of a two dimensional elastic shape modeled using the Boundary
Element Method (BEM) [9], and the formation can be deformed in a natural and controlled manner
and in real-time by displacing a few control nodes on the elastic shape. This flexible virtual structure
approach for formation control is then integrated with the continuum model [91] to plan in real-time
motions of multiple formations in virtual environments with dynamic obstacles. Simulations created with our algorithm run at interactive rates in quite complex environments. At runtime, different
formations normally avoid each other, but in case this is not feasible (i.e., planner is not able to
find collision-free motions for formations), we do allow them to go through each other (e.g., in narrow passages) without any collision between agents. In addition, each formation can be deformed
in real-time and the deformation is triggered either automatically (e.g., when the formation’s path
is blocked by dynamic obstacles) or manually. Via simulations, we show that our current implementation can plan at least four formations, each with about 20 agents, in real-time on a standard
PC.
This chapter is organized as follows. The problem to be solved is formally defined in Section 5.1.
In Section 5.2, we present the overall solution to the problem of coordinating multiple agents to move
in a tightly controlled formation in two dimensional virtual environments. A brief overview of the
BEM and some other methods for modeling deformable objects is then given in Section 5.3, before
we present the details of our flexible virtual structure approach to the formation control problem in
Section 5.4. In Section 5.5, we adapt the continuum model to plan motions of multiple formations in
real-time, where each formation is modeled by our flexible virtual structure approach for formation
64
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
65
control. We perform various experiments in Section 5.6 and conclude in Section 5.7.
5.1 Problem Description
As mentioned in the introduction, our first problem is to plan motion of a single formation in static
and dynamic environments; we then extend it to planning the motions of multiple formations. However, we formulate the overall problem of planning for multiple formulations directly with the single
formation version being a special case of the general problem. It simply is more natural this way.
Given k tightly controlled formations R 1 , . . . , R k , we define each formation R i , where 1 ≤ i ≤ k,
in frame Ffi . As shown in Fig. 5.1a, we designate one agent in R i as its leader and specify its heading
with a free vector (i.e., fi vi ) associated with the center of the leader. We represent the coordinates of
l th agent in formation R i with respect to frame Ffi by fi xli , where 0 ≤ l < Ni , where Ni is the number
of agents in R i . We use l = 0 to represent the leader of R i . The configuration of a formation R i is
represented by the position of its leader w x0i in the environment’s frame of reference Fw and angle
wθ
i
the heading vector makes w.r.t. the horizontal axis of Fw , (i.e., the tuple (w x0i ,w θi ) represents a
configuration of the formation R i , as shown in Fig. 5.1b). Given a point x and a heading direction v,
formation R i is mapped from frame Ffi to Fw so that the leader of R i is positioned at x (i.e., w xi = x)
and the heading of R i is aligned with v ( w vi = v) as shown in Fig. 5.1b. For simplicity, we model
agents in all formations as discs with the same radius r and the same maximum speed fmax .
The problem then is to plan in real-time the motions of the k formations, from their respective
initial configurations to their respective goal positions while maintaining the formations. The formations move in a two dimensional virtual environment (with dynamic obstacles), given as a binary
occupancy grid, and the motions of the dynamic obstacles are not known beforehand. We emphasize collision avoidance between the formations (over finding shortest paths to goals) by placing a
relatively high value on one of the three weights (i.e., γ ) in the unit cost field (2.6). In the event the
formations are not able to avoid each other, they are allowed to pass through each other as long as
agents in those formations do not collide with each other. As explained later, we use social potential
fields [3] to control the agent’s local motions (including collision avoidance). Furthermore, we only
require that the leader of each formation reaches its goal position (i.e., we do not require that the
formation has to reach a certain goal orientation).
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
66
5.2 Overall Solution
First we discuss how a formation R is deformed. To deform R , we place the N disc agents in R on a
two dimensional elastic object along with K control nodes. We denote the centers of the disc agents
as internal nodes. The formation R is deformed by displacing the K control nodes. These control
nodes are user specified. Because the BEM is a physically based approach, there is an intuitive
connection between the displacements of the control nodes and the resulting deformations of R .
For example, a Vee formation of 11 agents is shown in Fig. 5.2a and four user specified control
nodes are indicated by boxes (red in the color version). By displacing the four control nodes, the
Vee formation can be closed (Fig. 5.2c) and opened (Fig. 5.2e), in a very natural manner. The set of
allowable displacements is user-defined.
Given the displacements of the K control nodes, we want to compute the displacements of the N
internal nodes. We model the two dimensional elastic object with the BEM. As a first step in the process, the boundary of the elastic object is meshed with quadratic elements (details later), and certain
matrices are computed offline. These matrices allow us to efficiently compute the displacements of
N internal nodes subsequently. Second, from the displacements of the control nodes, we compute
the boundary traction1 by solving a multi-dimensional minimization problem. Third, the boundary
displacements are obtained from the boundary traction. This is referred as the Neumann Problem
(i.e., compute the displacements of the boundary given the traction of the boundary). Once both
the boundary traction and the boundary displacements are known, the displacements of the internal
nodes (i.e., the agents) are easily obtained using the matrices computed earlier in the first step.
This flexible virtual structure approach to formation control is then integrated with the continuum model to plan in real-time motions of multiple formations in frame Fw. First, we reduce each
formation to a point by growing the obstacles and then use the continuum model to compute a potential field for the formation. Next, from the gradient of the potential, we generate a sequence of
waypoints for each agent of the formation and then use social potential fields to move the agent
between its waypoints while avoiding collisions with other agents and obstacles. Finally, as shown
in Fig. 5.3, whenever a formation is blocked by obstacles, various “deformations” obtained by moving the control nodes are tried out and the one that leads to a collision-free motion and avoids the
obstacles is used.
1 Traction
is related to stress and is defined in the background section.
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
67
5.3 Background
In this section, we briefly recapitulate various methods for modeling deformable objects, and explain
the rationale for our choice of the Boundary Element Method. This is followed by a brief overview
of the BEM. Our treatment is mainly to give a basic overview for the reader, further details can be
obtained from the main references cited in each subsection.
5.3.1 The Boundary Element Method
An excellent survey of the work done in modeling deformable objects within the computer graphics
research community was presented in [27] and it focuses on physically based approaches such as
mass-spring models and finite element models. In mass-spring systems, an object is modeled as
a collection of point masses connected by springs in a lattice structure. Mass-spring systems are
widely used because they are easy to construct and enable real-time simulations of deformable objects. The main drawback of mass-spring systems is the difficulty of tuning spring constants, because
the constants’ proper values are not easy to derive from measured material properties. The Finite Element Method (FEM) can simulate object deformations more physically realistic than mass-spring
systems, but mass-spring systems are still much more popular in computer graphics, especially in
real-time systems, than FEM due to FEM’s high computation requirements. A non-physical method
called Free-form Deformation (FFD) was presented in [78]. FFD models deformation by deforming
the space in which an object lies. It is extremely fast, but even an experienced user may need to
tweak many control nodes patiently to obtain desired deformations [8]. By combining FFD with
ChainMail [26], where ChainMail provides physical properties and FFD deforms the deformable
object, a single deformable object can be deformed in real-time with “reasonable” physical properties [8]. First, the deformable object is placed inside a bounding box. Because ChainMail performs
simple deformation calculations for each element in the bounding box, the bounding box can be
deformed fast towards a collision-free state if the box is colliding with obstacles. Once the bounding box is collision-free, the deformable object inside the box is deformed by FFD according to the
shape of the box. However, given a formation of agents, the method proposed in [8] may produce
severe undesired local deformations of the formation. For example, as opposed to retaining the rank
formation but making it smaller by moving its agents closer to each other as shown in Fig. 5.7 so
that the formation can fit through the small gap between the obstacles, an agent in the rank formation
would only be displaced if the agent is subject to potential collision. As a result, the formation is no
longer rank formation. Instead, we choose the boundary element method because it enables us to
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
68
deform a formation in a controlled and ordered manner and in real-time.
We model formations using isotropic, homogeneous, and linear elastic materials [9]. Materials
are isotropic when their properties are direction independent. Homogeneous materials have the same
properties everywhere. Materials are linear if an unique (linear) relationship can be established
between stress σ and strain ε , where stress is force per unit area inside the material and strain is
defined through a vector of displacements u. Traction t is related to stress. Given a cutting plane,
traction is defined as the distributed force in any direction per unit area acting on the plane. Stress
and traction are related through a linear equation system [9]. The Boundary Element Method is then
used to solve this elasticity problem of isotropic, homogeneous, and linear elastic materials in two
dimensions.
Boundary Integral Equations And Fundamental Solutions
Boundary Integral Equations (5.1) represents a system of two integral equations which directly relate
traction t and displacements u on the boundary of an object S.
u(P) =
Z
T
t (Q)U(P, Q)dS(Q) −
S
Z
uT (Q)T(P, Q)dS(Q)
(5.1)
S
where
u(Q) =


 ux 
 u
y

 tx
t(Q) =
 t
y





U(P, Q) = 

T(P, Q) = 
Uxx Uyx
Uxy Uyy
Txx Tyx
Txy Tyy


(5.2)


(5.3)
As shown in Fig. 5.8a and Fig. 5.8b, P is the source point (located on the boundary S) where unit
sources/loads are applied and Q is the field point (located on the boundary S). U is the fundamental
solution (also called Green’s function or kernel) for the displacements and T is the fundamental
solution for the traction. The first subscript of U (respectively, T ) refers to the direction of a unit
load, and the second subscript relates to the direction of the displacement (respectively, traction) due
to the unit load.
The fundamental solutions for the displacement in the x and y directions due to a unit load in the
x-direction can be written as (Fig. 5.8a)
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS


Uxx (P, Q) = CC1 ln
rx
r
Uxy (P, Q) = C
!
1
r
!
ry
r
!
+
rx
r
!2
69



(5.4)
where C = 1/(8π G(1 − ν )), and C1 = 3 − 4ν . G is the shear modulus and ν is the Poisson’ ratio.
For a unit load in the y-direction (Fig. 5.8b)


Uyy (P, Q) = CC1 ln
1
r
!
+
ry
r
!2
Uyx (P, Q) = Uxy (P, Q)



(5.5)
The fundamental solutions for the traction due to a unit load at P in the x-direction are


Txx (P, Q) = − Cr2 C3 + 2


Txy (P, Q) = − Cr2 2
rx
r
!
rx
r
!2
ry
r
!


 cos θ


cos θ −C3 ny
where C2 = 1/(4π (1 − ν )), C3 = 1 − 2ν , cos θ =
direction n are defined in Fig. 5.8a and 5.8b.
rx
r
!
− nx
ry
r
!

(5.6)


ry
rx
n
+
x
r
r ny . θ and the outward normal
For a unit load in the y-direction we have


Tyy (P, Q) = − Cr2 C3 + 2


Tyx (P, Q) = − Cr2 2
rx
r
!
ry
r
!2
ry
r
!


 cos θ


cos θ −C3 nx
ry
r
!
− ny
rx
r
!

(5.7)


The fundamental solutions listed here are for plane strain problems. For our plane stress problem, we simply substitute an effective Poisson’s ratio of ν̄ = ν /(1 + ν ) [9].
The fundamental solutions are often problematic to integrate when the source point P coincides
with the field point Q (as will occur, when P = Q in Boundary Integral Equations (5.1)). The
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
70
fundamental solution U has a ln r singularity and is known as weakly singular. The weak singularity
poses no great problems. The fundamental solution T, on the other hand, has a 1/r singularity and is
known as strongly singular, and it does pose serious problem for us, because the integral only exists
in the sense of a Cauchy principal value (i.e., the integral can be evaluated on a contour around point
P only). However, it turns out that explicit calculation of these integrals can be avoided. We refer
the readers to [9, 30] for a complete treatment of the integrations of the fundamental solutions.
Numerical Implementation
For our two dimensional elasticity problem, one-dimensional elements are used to describe the
boundary. We choose quadratic elements over linear elements, because more complicated shapes
can be accurately described by a smaller number of elements with three nodes and three quadratic
shape functions. The quadratic shape functions are defined as
N1 = 21 (ξ − 1)ξ
N2 = 1 − ξ 2
(5.8)
N3 = 12 (ξ + 1)ξ
where ξ is the intrinsic coordinate and −1 ≤ ξ ≤ 1. The three nodes are placed at ξ = −1, ξ = 0,
respective ξ = 1. The Cartesian coordinates of a point on element e are
3
x=
∑ Nn(ξ )xen
(5.9)
n=1
where Nn are element shape functions, x is a vector containing coordinates of a point on element e
and xen is a vector of coordinates of the nth node of element e. The boundary in Fig. 5.8c is described
by 10 quadratic elements. Each element shares its first and third nodes with its two neighboring
elements. This means that if a boundary consists of E elements, there are 2E nodes on the boundary.
Now we can write the integral equation (5.1) in discretized form as
E
cu(Pi ) + ∑
3
e=1 n=1
where
E
3
∑ △Teniuen = ∑ ∑ △Ueniten
e=1 n=1
(5.10)
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
Se Nn (ξ )U(Pi , ξ )dS(ξ )
△Ueni =
R
Se Nn (ξ )T(Pi , ξ )dS(ξ )
△Teni =
71
(5.11)
R
The kernel shape functions products in (5.11) are integrated over elements, and Q in (5.1) has
been replaced by the local coordinate ξ . In (5.10), E is the total number of elements, the number
of nodes per element is 3, 2 × 1 vectors uen and ten are nodal values, and Pi (known as collocation
point in a numerical method called the collocation method) is placed at one of the boundary mesh
nodes [9]. The variables △Ueni , △Teni , and c are 2 × 2 matrices. We refer to [30] for details of how
to evaluate c (often referred to as “free term”) implicitly.
Eq. (5.10) is then evaluated with Pi corresponding to each node of the 2E nodes in the boundary
element mesh, and we get 2E vector equations (4E scalar equations) that can be used to solve the
elasticity problem. These equations can be expressed in matrix form as follows [30]
F′ u = Gt
(5.12)
where 4E × 1 vector u contains all nodal displacements, 6E × 1 vector t contains all nodal traction,
F′ is a 4E × 4E matrix, and G is a 4E × 6E matrix. The size of t is 6E instead of 4E, because the
traction is not constrained to be continuous at the boundary of two neighboring elements, whereas
the displacements are constrained to be continuous [30].
A solution to the Neumann problem (i.e., compute u given t) exists if and only if the equilibrium
condition specified in (5.13) is satisfied.
Z
t(Q)dS(Q) = 0
(5.13)
S
However, there is not a unique solution u to (5.12) and all solutions are related to each other
through a rigid-body transformation [30]. Since there are three degrees of freedom in 2D, the rank
of the matrix F′ is 4E − 3; therefore F′ is not invertible. We rewrite F′ using singular value decomposition (SVD) of the form
F′ = UWVT
where W is a diagonal matrix. A unique solution to the Neumann problem is given by
(5.14)
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
u = At
72
(5.15)
where 4E × 6E matrix A = V[diag(1/w j )]UT G and w j are the singular values and the value 1/w j
is set to zero for the three singular values near zero [30]. This method finds the solution with the
smallest magnitude kuk2 . A depends only on the object’s geometry so it can be computed offline in
O(E 2 ) time.
Computing Displacements Of The Internal Nodes
Once both the boundary traction and the boundary displacements are known, we can easily obtain
N vector equations that can be used to compute the displacements of the N internal nodes. The
displacement at an internal node Pa inside the domain can be computed by simply rewriting (5.1)
u(Pa ) =
Z
T
S
t (Q)U(Pa , Q)dS(Q) −
Z
S
uT (Q)T(Pa , Q)dS(Q)
(5.16)
The discretized form of (5.16) is written as
E
u(Pa ) =
3
E
3
∑ ∑ △Uenten − ∑ ∑ △Tenuen
e=1 n=1
(5.17)
e=1 n=1
where
△Uen =
△Ten =
R
R
Se U(Pa , Q)Nn dS(Q)
(5.18)
Se T(Pa , Q)Nn dS(Q)
Apply (5.17) to all N internal nodes and obtain N vector equations (2N scalar equations) that
can be used to compute the displacements of the internal nodes. These equations can be expressed
in matrix form as follows [30]
uint = Gint t − Fint u
(5.19)
where 2N × 1 vector uint contains displacements of N internal nodes, the dimensions of matrices
Gint and Fint are 2N × 6E and 2N × 4E, respectively. These two matrices can be computed offline
in O(NE) time.
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
73
5.4 A Flexible Virtual Structure Approach For Formation Control
We now present the details of our flexible virtual structure approach to the formation control problem
in virtual environments.
5.4.1 Real-Time Formation Deformation
In order to deform a formation R by displacing K user-defined control nodes on the elastic object
(i.e., inside the boundary), we have to compute the traction of boundary nodes t. In this section, we
drop the subscript i from R i and other notations for brevity. In Fig. 5.2a, we have a Vee formation
of 11 agents bounded by a circular boundary, and the four control nodes are designated by (red in
the color version) boxes. Given the desired displacements of the control nodes uctrld , we want to
calculate t that will bring about specified displacements of the control nodes. Because the control
nodes are located inside the boundary, the relationship between the computed displacements of the
control nodes uctrlc and t can be derived from (5.15) and (5.19)
uctrlc = (Gctrl − Fctrl A)t
(5.20)
where 2K × 1 vector uctrlc contains displacements of K control nodes, the dimensions of matrices
Gctrl and Fctrl are 2K × 6E and 2K × 4E, respectively. These two matrices can be computed offline
in O(KE) time.
Next, we define an error function E(t) as the L2 -norm of the difference between the desired
displacements of the control nodes uctrld and the computed displacements uctrlc (i.e., (5.20))
E(t) = kuctrld − uctrlc k
(5.21)
The nodal traction t that minimizes the error function E(t) can be computed by solving a multidimensional minimization problem using an unconstrained multi-variable minimization technique
called the Broyden-Fletcher-Goldfarb-Shanno (BFGS) method [30]. However, if the BFGS method
is used directly, the resulting boundary traction t produced by the BFGS method does not satisfy the
equilibrium condition (5.13) and may create numerical instabilities in the solution of the Neumann
problem.
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
74
To solve the constrained minimization problem, we recast the constrained problem into an unconstrained form of reduced dimensionality [31]. We write the error function (5.21) in the form
E(Zy) = kuctrld − uctrlc k
(5.22)
where y ∈ ℜ6E−2 is an unconstrained vector, Z is a 6E × (6E − 2) matrix, and t = Zy. Instead of
computing t ∈ ℜ6E directly, we compute y ∈ ℜ6E−2 using the BFGS method by minimizing the error
function (5.22). y is then mapped to a boundary traction t which satisfies the equilibrium condition
(5.13) by Z (i.e., t = Zy). The matrix Z is derived from the equilibrium condition (5.13). Express
first the equilibrium condition (5.13) in discrete form

BT t = 
0
0

(5.23)

where B is a 6E × 2 matrix. The QR decomposition for B can be written as

B = Q
R
0

=
h
Q1 Q2
i


R
0

 = Q1 R
(5.24)
where Q is a 6E × 6E orthogonal matrix, R is a 2 × 2 upper triangular matrix, Q1 is a 6E × 2 matrix,
and Q2 is a 6E × (6E − 2) matrix. The matrix Z is set to Q2 .
Once the nodal traction t has been determined, the boundary nodal displacements u are obtained
using (5.15). The displacements of the internal nodes (agents) uint are obtained using (5.19).
Using this method, two different deformations of the Vee formation (Fig. 5.2a) are shown in
Fig. 5.2c and Fig. 5.2e, respectively, corresponding to the displacements of the control nodes.
5.4.2 Fast Collision Detection For Self-Collision Free Deformation
Since our agents are disc shaped, not point-agents, we need to rule out deformations that result
in agents colliding with each others (i.e., we retain only self-collision free deformations). This is
achieved by checking for collisions among the agents after each displacement of the control nodes.
By comparing each agent with every other one in formation R , the collision checking can be done
in O(N 2 ) time, where N is the number of agents in R . However, if R has large numbers (i.e.,
N > 50 [12]) of agents, spatial partitioning [12] is much faster than the naive O(N 2 ) collision
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
75
checking. First, we divide the two dimensional space where R is located into a number of cells,
where each cell contains a list of all agents inside the cell. Next, we keep track of all agents while
R deforms. When an agent moves into a new cell, the agent is removed from its old cell’s list and
added to the new cell’s list. With such partitioning, the collision checking takes, on average, O(N)
time, because we need only test collision between an agent and the agents contained in the cells lie
within the agent’s neighborhood. The deformed formation is rejected if any two agents collide after
the deformation. Note that if the virtual environments are not given as occupancy grids, kinetic data
structures (KDS) [6, 5] could potentially be used instead of spatial partitioning.
5.4.3 Generation Of Deformations
We assume that Uctrld = (u1ctrld , . . . , um
ctrld ) – a user-defined list of m displacements of the K control
nodes – is given and the output is a linear list U f ree of tuples of uctrld (i.e., the desired displacements
of the control nodes) and uint (i.e., the displacements of the internal nodes (agents) due to uctrld ).
We can now generate deformations of formation R using the BEM as shown in Algorithm 7.
Algorithm 7: Generating Deformations using the BEM
input : formation R with N agents, boundary of the elastic shape with E quadratic
elements, K control nodes, and a list of their displacements Uctrld .
output: U f ree – a list of tuples of uctrld and uint
offline : Compute the matrices Fctrl , Gctrl , Gint , Fint , A, and Z.
7.1 repeat
7.2
uctrld ← pop(Uctrld );
7.3
Compute the unconstrained vector y using the BFGS method;
7.4
t = Zy , where the boundary traction t brings about the desired displacements of the
control nodes uctrld ;
7.5
Compute the boundary nodal displacements u using u = At (i.e., (5.15));
7.6
Compute the displacements of the internal nodes (agents) uint (i.e., the formation after
the deformation) using uint = Gint t − Fint u (i.e., (5.19));
7.7
Check for collisions between agents after the deformation. If any two agents collide,
the deformed formation is rejected. Otherwise, U f ree = U f ree ∪ (uctrld , uint );
7.8 until Uctrld is empty ;
The BEM matrices Fctrl , Gctrl , Gint , Fint , A, and Z are pre-computed and depending on the
number of available processors, the loop in Algorithm 7 (i.e., Step 7.1) could be performed either
offline or online.
In the next section, we integrate this flexible virtual structure approach for formation control with
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
76
the continuum model to plan in real-time motions of multiple formations in two dimensional virtual
environments, where each formation may be deformed (triggered either automatically or manually)
at runtime.
5.5 Motion Planning Of Formations
We again adapt the continuum model to plan motions of multiple formations in real-time, where
each formation is modeled by our flexible virtual structure approach for formation control.
5.5.1 Construction Of Unit Cost Field
We first construct speed field fi and discomfort field gi for each formation R i in frame Fw where the
formation’s motion is planned. Once fi and gi are set, the formation’s unit cost field Ci is given by
(2.6).
Speed
Since our goal is to plan motions of multiple formations and they should normally avoid each other,
we make the assumption in this chapter that the speed field fi does not depend on the density of the
agents. In addition, we assume also that a grid cell represents either an obstacle or a flat free space.
Consequently, the topographical speed fT in this chapter is either free speed f f ree or 0. Recall that
the speed field is an anisotropic fields and it is stored at each face between two neighboring grid
cells. When computing the speed field fi , we iterate over each grid cell and then over each of the
four faces of the grid cell. Speed for one face is set to f f ree if and only if both the grid cell and the
neighboring grid cell represent free space, otherwise it is set to 0. In addition, the anisotropic speed
field fi can be used to force formation R i to follow a flow (e.g., a water current). For example, we
can force formation R i to follow a circuitous route such as a roundabout, if speed for each face of
the roundabout grid cells is set to f f ree with the additional requirement that the face is facing the
allowable direction of the roundabout.
Discomfort
When planning path for formation R i , all other formations in the virtual environment are considered
to be obstacles for R i . Because we replan all formations’ paths in each cycle, every formation is
considered to be translating for such incremental motion. Consequently, a formation is simply a
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
77
vector of the placements of all agents in the formation. Let R j , where j = 1 . . . k and j 6= i, represent
the formations other than R i . Formation R i can then be reduced to a point by computing C -obstacle
(i.e., the configuration-space obstacles) of R j due to R i ,
CR j := {x0i : R i (x0i ) ∩ R j 6= 0}
/
where R i (x0i ) represents placements of all agents in R i with its leader at x0i , CR
(5.25)
j
denotes the C -
obstacle and it can be computed using Minkowski sum [19].
For both static and dynamic obstacles (other than formations), we could use the same Minkowski
sum based computation. However, Minkowski sum computation is expensive, especially when we
want to set as many unit cost fields as possible per second. Consequently, we only use Minkowski
sum for formations because they can come close to and even passing through each other. Instead of
Minkowski sum, we chose a more computationally efficient but conservative method for obstacles
(i.e., grow each occupied grid cell by the radius rR i of R i (x0i )’s minimum bounding circle CR i ).
By adding discomfort to the resulting occupied/grown grid cells, formation R i will try to avoid
the other formations and obstacles because it prefers grid cells with lower discomfort. Last but not
least, we advance each CR j by the velocity of R j for several cycles and add to the discomfort field
gi along the way as in [91] so that two formations (i.e., R j and R i ) anticipate one another when they
cross perpendicularly.
Once unit cost field Ci for formation R i is set, we construct potential φi and its gradient ∇φi using
the FMM so that R i (specifically its leader) can move opposite the gradient ∇φi until it reaches its
goal position. We now detail how this motion is carried out for R i .
5.5.2 Moving Formation Along Gradient: Construction Of Waypoints
Since formation R i is defined in frame Ffi and its motion is planned in frame Fw , we must map R i
from frame Ffi to frame Fw . Furthermore, in order to move the formation, each of the agents must
be moved. The agents’ positions in Fw (after the mapping) are treated as waypoints and are not used
for rendering directly. If we were to do the latter, formation R i would essentially behave like a rigid
body and its motion will not look natural at all. Instead social potential fields are used to move each
agent of R i to its next waypoint, determined as below.
Let t denote the current time, and let R i ’s current configuration w.r.t. Fw be (w x0i (t),w θi (t)), i.e.,
the leader of R i is positioned at w x0i (t) and the heading of R i is aligned with a unit vector w vi (t)
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
78
as shown in Fig. 5.9, where w vi (t) is determined by w θi (t). The next waypoint for the leader (i.e.,
waypoint at time t + ∆t) is given by:
w 0
xi (t + ∆t) =w
x0i (t) +w ẋ0i (t)∆t
(5.26)
where w ẋ0i (t) is given by (2.7) and it moves the leader opposite the gradient of the potential function
∇φ (w x0i (t)) scaled by the speed at that point. Note that the translational speed is limited to f f ree .
The waypoints for all other agents are determined as follows. Let w vi (t + ∆t) = −∇w φi (w x0i (t)), the
homogeneous transformation w T fi (t + ∆t) is then constructed to map formation R i from Ffi to point
w x0 (t + ∆t) and align
i
its heading with w vi (t + ∆t). (w x0i (t + ∆t),w θi (t + ∆t)) uniquely determines R i ’s
configuration w.r.t. Fw at time t + ∆t, where w θi (t + ∆t) is determined by w vi (t + ∆t). Hence, we can
now determine the waypoints for agents other than the leader via a simple coordinate transformation.
w l
xi (t + ∆t) =w
T fi (t + ∆t) fi xli (t + ∆t), where 0 < l < Ni
(5.27)
In this configuration, an agent in formation R i may have to exceed its maximum speed fmax to reach
its waypoint at time t + ∆t from its current position, because the rotation from −∇w φi (w x0i (t − ∆t))
to −∇w φi (w x0i (t)) can be substantial.
To limit the rotation from −∇w φi (w x0i (t − ∆t)) to −∇w φi (w x0i (t)), we can smooth unit cost field
Ci to increase the lower bound of the curvature radius of the optimal path [16]. However, the efficiency of the smoothing is limited for us because we have to represent virtual environments with
grids with coarse resolution (64 × 64) due to the real-time constraint. Instead, we set w vi (t + ∆t) to a
vector lying in the middle of w vi (t + ∆t) and w vi (t) if any agent in R i needs to exceed fmax to reach its
waypoint at time t + ∆t. We repeat this process until no agent needs to exceed fmax . Consequently,
formation R i changes its orientation gradually.
5.5.3 Social Potential Fields
Once we have constructed a set of waypoints for formation in R i , we use social potential fields [3] to
control R i ’s agents’ local motions. For each agent in R i , we draw the agent from its current position
to its next waypoint with an attractive force. We add also repulsive forces to each agent for collision
avoidance with other agents and obstacles in the neighborhood. The repulsive forces are necessary
because formation R i may pass through other formations and come close to obstacles when there
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
79
is no path that pass through areas with low discomfort (e.g., when it has to pass through narrow
passages).
Since we use social potential fields to move agents between their waypoints and avoid collisions,
the agents may run into local minima even though potentials generated by the FMM are free of local
minima analytically. In fact, we did encounter local minima during the experiments (e.g., when
agents go around corners of obstacles).
5.5.4 Formation Deformation
Because formation R i is modeled using our flexible virtual structure approach for formation control,
we can deform R i (by either displacing its control nodes and then computing the deformation in
real-time or fetching the pre-computed deformation) and this can be triggered either automatically
or manually. Our algorithm deforms formation R i automatically whenever R i cannot reach its goal
position (i.e., whenever φi (w x0i (t)) – potential felt by R i at w x0i (t) – is very high because a high
potential means that R i will collide with obstacles) and tries to find a collision-free path for the
deformed formation R i . The algorithm tries each deformation – determined by uint stored in each
tuple of the list U f ree computed in Algorithm 7 – and recomputes φi (w x0i (t)). The process is repeated
until φi (w x0i (t)) becomes low (i.e., there is a collision-free path for the deformed formation R i )
or all tuples in U f ree have been processed (i.e., formation R i cannot reach its goal even after the
deformation). In the latter case, the planner is deemed to have failed.
The pseudo-code for real-time motion planning of multiple formations is summarized in Algorithm 8. It reports failure of finding a collision-free path for formation R i if φi (w x0i (t)) remains very
high at Step 8.7 for all deformations of R i (i.e., all uint in mathb fU f ree ). In order to get smooth
simulation and rendering, we run Step 8.6 in a separate process than other steps in Loop 8.2 so that
we can update agents’ positions (using social potential fields) more frequently than the computation
of potential fields and waypoints.
5.6 Experiments And Results
We have performed a number of experiments and made a video to show the effectiveness of our
approach on a Dell OptiPlex GX620. The OptiPlex has one Intel Pentium D Processor 820 with two
execution cores running at 2.8GHz, one 256MB ATI Radeon X600 video card, 4 gigabytes of RAM,
and runs Red Hat Enterprise Linux (RHEL) 4. The code was written in ANSI C/C++ and compiled
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
80
Algorithm 8: The Continuum Model for Formations
8.1
8.2
8.3
8.4
8.5
8.6
8.7
8.8
8.9
8.10
8.11
8.12
foreach cycle do
foreach formation R i do
Construct speed field fi , discomfort field gi , and unit cost field Ci ;
Construct potential φi and its gradient ∇φi using the FMM;
Construct the waypoints such that no agent in R i exceeds its maximum speed fmax ;
Update positions of R i ’s agents using social potential fields;
while ( φi (w x0i (t)) is very high or a command is given by the user ) do
(uctrld , uint ) ← GetOneTuple(U f ree );
Deform R i by displacing its agents by uint ;
end
end
end
using GNU GCC 3.4.3. The video can be found at http://ramp.ensc.sfu.ca/people/
liyi/LI_GUPTA_FORMATIONS_VIDEO.mp4.
5.6.1 The Flexible Virtual Structure Experiments
First, we present experiments that illustrate effect of E (number of quadratic elements), K (number
of control nodes), and N (number of agents), respectively on the computation times of the BEM
matrices (i.e., A, Fctrl , Gctrl , Fint , and Gint ) and the deformation time which is dominated by the
time it takes to solve the minimization problem using the BFGS method. We also present many
different formation deformations produced by the BEM to demonstrate its capability.
We use the Vee formation in Fig. 5.2 to illustrate effect of the number of quadratic elements E on
the computation times of the BEM matrices and the deformation time. We bound the formation with
a circular boundary and mesh the boundary into 12 quadratic elements (i.e., E = 12) (Fig. 5.2a), then
deform the formation, using four control nodes (i.e., K = 4). Two different deformations are shown
in Fig. 5.2c and Fig. 5.2e, respectively. The formation with 24 quadratic elements (i.e., E = 24) and
its deformations are also shown in Fig. 5.2 (i.e., Fig. 5.2b, Fig. 5.2d, and Fig. 5.2f, respectively). The
computation time for the BEM matrices and average computation time (averaged over 20 different
deformations) for one deformation are listed in Table 5.1. When we set E to 12 instead of 24, the
formation is deformed four times faster and hence we can conclude empirically that the deformation
time increases quadratically with the number of quadratic elements E. At the same time, Fig. 5.2
clearly indicates that 12 quadratic elements can represent the elastic shape properly in numerical
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
81
modeling. Consequently, we have to choose an E small enough to achieve real-time performance
when deforming the formation and big enough to represent the elastic shape properly in numerical
modeling.
Fctrl
Gctrl
Fint
Gint
A
Time per Deformation
E = 12
E = 24
20 ms
10 ms
30 ms
20 ms
140 ms
152 ms
20 ms
20 ms
60 ms
50 ms
530 ms
603 ms
Table 5.1: Computation time of the BEM matrices in millisecond and average computation time
(over 20 different deformations) for one deformation in millisecond for the Vee formation in Fig. 5.2.
The effect of the number of agents in a formation N and the number of control nodes K on the
deformation computation time is checked using six infantry formations of various sizes and various
number of control nodes. A infantry formation with 21 agents (i.e., N = 21) and two control nodes
(i.e., K = 2) is shown in Fig. 5.10a. Average computation time for one deformation are listed in
Table 5.2. The number of agents in a formation N does not significantly affect the deformation time,
because it takes only three matrix multiplications and one matrix subtraction (see (5.15) and (5.19))
to find the displacements of all agents once the minimization problem (independent of N) is solved
and t is known. However, the data in Table 5.2 show empirically that the deformation time increases
linearly with the number of control nodes K.
K
2
2
2
4
4
4
E
12
12
12
12
12
12
N
133
57
21
99
55
21
Time per Deformation
85 ms
82 ms
83 ms
151 ms
149 ms
150 ms
Table 5.2: Average computation time for one deformation in millisecond for the infantry formations.
K is the number of the control nodes, E is the number of control nodes, and N is the number of
agents. The number of deformations was 20 in each case.
The infantry formation in Fig. 5.10a is bounded by an elliptic boundary, while the rest of formations in Fig. 5.10 are bounded by circular boundaries. The BEM even allows shapes with sharp edges
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
82
(e.g., rectangles) as boundaries; however, we find that deformations produced by smooth boundaries
look more natural. As shown in Fig. 5.10b, the infantry formation can by bent by displacing its 2
control nodes. The rank formation in Fig. 5.10c is controlled by 4 control nodes. By displacing the
control nodes, the agents’ positions can be scaled (Fig. 5.10d) to make the entire formation smaller
so that it can pass through a narrow passage. Our flexible virtual structure can achieve more complicated deformations than bending and scaling. For example, we can change the infantry square
formation in Fig. 5.10e to the infantry “circle” formation in Fig. 5.10f. The infantry square formation in Fig. 5.10g is expanded by displacing 8 control nodes (i.e., K = 8), and the result is shown in
Fig. 5.10h.
5.6.2 The Motion Planning Experiments
Next, we demonstrate the capability of Algorithm 8 through five experiments shown in Fig. 5.3,
5.4, 5.5, 5.6, 5.11, 5.12, 5.13, and 5.14. All virtual environments and agents were rendered in
3D using OGRE [90] and in a separate process than the planning process [57] that computed the
potential fields for all k formations. In addition, we pre-computed all formations’ deformations offline using the BEM, because the OptiPlex has only two execution cores and not enough to compute
deformations in real-time.
Four screenshots in Fig. 5.11, 5.12, 5.13, and 5.14 show an infantry of 63 agents “bend” while
moving towards its goal. This deformation is useful in the military to encircle the enemy. Compared
to the formation in Fig. 1.2, the infantry in Fig. 5.11, 5.12, 5.13, and 5.14 kept the formation all
the way to the goal and did not split up to avoid the three static obstacles. Note that the screen was
updated at around 65 fps.
Fig. 5.3, 5.4, 5.5, and 5.6 were drawn in postscript using the data collected during the experiments to show the formations’ initial configurations, final configurations, and the paths between
the configurations. In Fig. 5.3, 5.4, 5.5, and 5.6, static obstacles are drawn in dark grey (red in
color prints), each formation’s initial configuration and final configuration are shown as a number of
black circles and black discs, respectively. Note that the black circles/discs represent the agents that
belong to the formation.
• Dynamic Obstacles: The rank formation in Fig. 5.3 demonstrates the ability of our algorithm
to handle dynamic obstacles. When the two dynamic obstacles marked by light grey rectangles
(cyan on color prints) suddenly appeared, the rank formation deformed automatically to make
itself it smaller so that it can fit through the small gap between the two obstacles.
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
83
• Circuitous Routes: Our algorithm allows optimal paths that follow circuitous routes, because
it is based on the FMM presented in [92]. For example, in Fig. 5.4, our algorithm moved three
Vee formations counter-clockwise around the obstacle in the middle.
• Deformable Formations: Our algorithm can handle many different formations. Four very
different formations (No. 1: Vee formation; No. 2: rank formation; No. 3: file formation;
No. 4: infantry square formation) are shown in Fig. 5.5 and two of them (i.e., No. 1 Vee
formation and No. 4 infantry square formation) deformed during the simulation. Note that
the deformations were triggered manually.
• Complex Environments: Fig. 5.6 demonstrates that our algorithm can handle complex environments with non-convex obstacles. The FMM can overcome local minima induced by e.g.
concavities because goal position (of each formation) is the only global minimum.
In addition, as shown in Fig. 5.11, 5.12, 5.13, 5.14, 5.3, 5.4, 5.5, and 5.6, all formations
changed their orientations gradually because our algorithm prevents agents from exceeding their
maximum speeds.
In each simulation cycle, we have to construct a potential field φ over the entire virtual environment using the FMM for each formation. Therefore, given n formations, the n potential fields
(one for each formation) are computed in O(n) time in each cycle. This is verified empirically with
experiments on 64 × 64 grids, where 1, 2, 4, and 6 formations were selected, respectively, and each
experiment was run for 30 seconds. The average FMM running time of one cycle (i.e., n times the
average running time of Step 8.4 in Algorithm 8) in Table 5.3 increases linearly with n. Because each
formation takes all other formations into account (through the Minkowski sum computations) when
it plans its next move and hence the unit cost fields are constructed in O(n2 ) time in each simulation
cycle. Therefore, each simulation cycle takes O(n2 ) time in our current implementation and this is
verified by the average total running time of one cycle (i.e., the average running time of Step 8.2
in Algorithm 8) in Table 5.3. This limits the number of formations our current implementation can
handle in real-time. However, if we utilize spatial partitioning [12] again and let a formation take
another formation into account if and only they are close to each other, then each simulation cycle
can be done, on average, O(n) time instead of O(n2 ) time and hence more formations can be handled
in real-time.
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
84
Table 5.3: Running Time (millisecond/cycle).
No. of Formations FMM Running Time Total Running Time
1
5 ms
12 ms
2
10 ms
48 ms
4
20 ms
184 ms
6
30 ms
364 ms
5.7 Conclusion
In this chapter, we have introduced a real-time multi-formation navigation algorithm that combines
the continuum model for crowd simulation and our flexible virtual structure approach for formation
control in virtual environments. To the best of our knowledge, this motion planning algorithm for
multiple formations is the first one that does not use ad-hoc and local approaches and hence agents
in a formation does not split easily from the formation. We have shown that our method can handle
dynamic obstacles, circuitous routes, deformable formations, and complex environments in realtime. At runtime, different formations normally avoid each other, but in case this is not feasible (i.e.,
planner is not able to find collision-free motions for formations), we do allow them to go through
each other (e.g., in narrow passages) without any collision between agents.
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
85
formation R i
leader
Ff i
heading fi vi
f i x0
i
(a) A Vee formation R i in frame F fi .
wv
i
w x0
i
formation R i
wθ
i
Fw
(b) The Vee Formation R i in frame Fw .
Figure 5.1: A formation R i is mapped from frame Ffi , where it is defined, to the environment’s frame
of reference Fw .
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
(a) A Vee formation and the meshed boundary
with 12 quadratic elements.
(b) A Vee formation and the meshed boundary
with 24 quadratic elements.
(c) Closing the Vee formation in Fig. 5.2a.
(d) Closing the Vee formation in Fig. 5.2b.
(e) Opening the Vee formation in Fig. 5.2a.
(f) Opening the Vee formation in Fig. 5.2b.
86
Figure 5.2: A Vee formation located on an imaginary circular elastic shape can be deformed in realtime using BEM by displacing the (red in the color version) box control nodes located on the elastic
shape. The displacements of the control nodes are represented by arrows.
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
87
1
1
Sample No. 4756
Figure 5.3: Path for a rank formation in a virtual environment (64 × 64 grid). The formation’s initial
configuration and final configuration are shown as a number of black circles and black discs (which
represent the agents), respectively.
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
88
2
1
3
1
3
2
Sample No. 1756
Figure 5.4: Paths for three Vee formation in a virtual environment (64 × 64 grid). Each formation’s
initial configuration and final configuration are shown as a number of black circles and black discs
(which represent the agents), respectively.
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
89
1
3
2
4
2
4
3
1
Sample No. 4041
Figure 5.5: Paths for four formations in a virtual environment (64 × 64 grid) without static obstacles.
Each formation’s initial configuration and final configuration are shown as a number of black circles
and black discs (which represent the agents), respectively.
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
90
2
2
3
4
1
4
1
3
Sample No. 6298
Figure 5.6: Paths for four formations in a virtual environment (64 × 64 grid) with static obstacles.
Each formation’s initial configuration and final configuration are shown as a number of black circles
and black discs (which represent the agents), respectively.
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
91
Figure 5.7: The rank formation in [70] is made smaller by moving its agents closer to each other so
that the smaller formation can fit through the small gap between the obstacles.
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
(a) Notation for 2D fundamental solution (unit load in x-direction).
(b) Notation for 2D fundamental solution (unit load in y-direction).
(c) Boundary Element Mesh.
Figure 5.8: Boundary Element Method.
92
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
w x0 (t)
i
93
wv
i (t)
−∇w φi (w x0i (t − ∆t))
path segments
waypoints at t + ∆t
wv
i (t + ∆t)
waypoints at t
wθ
i (t)
wθ
i (t + ∆t)
−∇w φi (w x0i (t))
w x0 (t + ∆t)
i
Fw
Figure 5.9: Construction of waypoints for formation R i at time t + ∆t.
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
(a) Infantry formation.
(b) “Bent” infantry formation.
(c) Rank formation.
(d) Compressed rank formation.
(e) Infantry square formation.
(f) Infantry “circle” formation.
(g) Infantry square formation.
(h) Expanded infantry square formation.
Figure 5.10: Formations and their deformations.
94
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
95
Figure 5.11: An infantry of soldiers move around in a virtual environment (64 × 64 grid) with three
static obstacles. Figure No. 1 out a series of 4.
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
96
Figure 5.12: An infantry of soldiers move around in a virtual environment (64 × 64 grid) with three
static obstacles. Figure No. 2 out a series of 4.
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
97
Figure 5.13: An infantry of soldiers move around in a virtual environment (64 × 64 grid) with three
static obstacles. Figure No. 3 out a series of 4.
CHAPTER 5. MOTION PLANNING OF MULTIPLE FORMATIONS
98
Figure 5.14: An infantry of soldiers move around in a virtual environment (64 × 64 grid) with three
static obstacles. Figure No. 4 out a series of 4.
Chapter 6
Conclusion and Future Work
6.1 Conclusion
In this thesis, we studied the problem of real-time motion planning of multiple agents and multiple formations in two dimensional virtual environments (e.g., environments in Real-time Tactical
games) and presented three algorithms to tackle the following challenges offered by RTT games:
1. Multiple agents: There are large numbers of agents moving around in the virtual environments and those agents must avoid each other.
2. Real-Time: The agents’ motions must be computed in real-time. Thus, the planner must be
able to perform path query in real-time while the game is being played.
3. Dynamic: Virtual environments contain not only static obstacles, but also dynamic obstacles.
4. Complexity: Virtual environments can be complex.
5. Coherence: The resulting motions of the agents in the same formation planned by a planner
must be perceived by humans as being coherent.
6. Inexpensive pre-processing: A planner may not spend more than a few seconds in the preprocessing phase.
We have used the basic continuum model extensively in this thesis, because it unifies global
planning and collision avoidance, and the efficiency of the FMM is not affected by the complexity
of (i.e. number and shapes of obstacles) of the virtual environment [69]. However, the basic model
99
CHAPTER 6. CONCLUSION AND FUTURE WORK
100
may fail to plan deadlock free paths for multiple agents in narrow passages. We showed how to
combine the basic method with a symbolic AI technique (i.e., coordination graph) to plan motions
of multiple agents in real-time. The rules we designed for coordination graphs are simple and intuitive, yet we were able to achieve complex behaviors such as agents’ behaviors inside roundabouts
(i.e., follow the direction of the traffic flow). In order to process multiple CG tasks in real-time, we
proposed to process those tasks in parallel on a SMP system. The task parallelism was implemented
in a supervisor-worker paradigm with Unix processes. The supervisor not only updates each agent’s
position and orientation at each timestep, but also distributes jobs to the workers and receives results (i.e. optimal joint actions) from the workers. A worker takes order from the supervisor, then
constructs a coordination graph and computes an optimal joint action. We obtained significant, scalable (i.e., we can process more coordination graphs in real-time by adding processors) speedups by
constructing and processing coordination graphs in parallel. By decoupling the rendering and the
planning, we were able to render at a higher frame rate than 24 fps.
Next, we proposed an adaptive multi-resolution continuum model to plan motions of agents
with independent goals (i.e., increase the number of agents with independent goals compared to
the basic model, where agents have to be grouped into a few groups with all agents in a group
sharing the same goal in order to main real-time performance), while retaining the advantages of the
basic model. The key to the efficiency of our approach is that we restrict the computation of each
agent’s potential field to a channel, where the channel is constructed/updated a very low frequency
or whenever it is blocked by dynamic obstacle(s). As an intrinsic byproduct, our approach can steer
the agents away from narrow passages to open spaces (if desired), but it will not miss paths that pass
through narrow passages if they are the only options. The experiments show that our adaptive multiresolution continuum model can plan motions of a larger number of individual agents on larger grids
compared to the basic model.
Finally, we considered the problem of real-time motion planning of multiple tightly controlled
formations in two dimensional virtual environments, because agents in RTT games often move in
formations. We proposed a novel flexible virtual structure approach to the formation control problem. The approach conceives of all the agents in a formation as parts of an elastic shape, which is
modeled using the boundary element method. The flexible virtual structure approach is then integrated with the basic continuum model to plan motions of multiple formations in real-time. To the
best of our knowledge, this multi-formation navigation algorithm is the first one that does not use
ad-hoc and local approaches and hence agents in a formation does not split easily from the formation. We have shown that our method can handle dynamic obstacles, circuitous routes, deformable
CHAPTER 6. CONCLUSION AND FUTURE WORK
101
formations, and complex environments in real-time.
We believe that these three algorithms can be used as basic motion planning toolkits toward
enhancing the capabilities of RTT games.
6.2 Future Work
In this thesis, we assumed that agents know the current properties of all dynamic obstacles (i.e., we
do not take into account agents’ “line of sight” / visual occlusions). However, it is easy to incorporate partial visibility — visibility evaluations can be done using the fast marching method [81] —
into the adaptive multi-resolution continuum model where each agent has its own dedicated potential field. Although we prevented the agents in formations from exceeding their maximum speeds
so that the formations changed their orientations gradually, there is no explicit consideration for
dynamic constraints such as inertia of a moving agent. Such considerations will enhance the visual
impact, however, the challenge would be to meet the real-time requirement while respecting such
constraints [91].
When we coordinated motions of multiple agents using coordination graphs for deadlock avoidance in narrow passages, we stopped these agents whose optimal actions are ¬enter by setting their
velocities to zero. However, when there are many agents waiting at an entrance, they may block
agents who want to exit the narrow passage connected to the entrance. Instead, the waiting agents
should be allowed to move around in the entrance (e.g., step to the left/right).
We did not use coordination graphs to coordinate motions of multiple formations in narrow
passages, because we assumed that two formations are allowed to pass through each other in such
situations. Formations may be forbidden to pass through each other in some situations. It that case,
our coordination graphs based scheme can be to extended to coordinate multiple formations. By
adding more rules to the existing sets of rules, the scheme can also be extended to handle dynamic
obstacles. Furthermore, the coordination graphs based deadlock avoidance scheme can also be
incorporated into the adaptive multi-resolution continuum model. Even though the multi-resolution
extension can steer agents away from narrow passages to open spaces, the agents may have to pass
through narrow passages when paths solely in open space do not exist.
The running time of each simulation cycle in the motion planning algorithm we presented in this
thesis for multiple tightly controlled formations grows quadratically with the number of formations
because Minkowski sum computations between the formations is done naively (i.e., a formation,
when planning its next move, takes all other formations into account). More efficient data structures
CHAPTER 6. CONCLUSION AND FUTURE WORK
102
should be investigated here to make the algorithm scale better with the number of formations. Furthermore, the agents may run into local minima even though potentials generated by the FMM are
free of local minima analytically, because social potential fields are used to move agents between
their waypoints and avoid collisions.
In this thesis, we assumed that the virtual environments are given as binary occupancy grids.
This assumption in combination with the fact that only grids with relatively coarse resolution can be
used due to the real-time constraint means that polygonal obstacles can not be represented accurately
(by binary occupancy grids). We could partition the environments into unstructured meshes (instead
of grids). Note that this will also result in faster computing of potential fields [69] because far
fewer faces (than grid cells) will be needed. The fast marching method has been extended to handle
unstructured meshes [46, 82] and we believe that the algorithms presented in this thesis can also be
extended to handle virtual environments given as unstructured meshes. Another way to speed up
computation of potential fields is to perform the fast marching on multiple processes mapped onto
multiple processors. Potentials in this thesis were computed sequentially on a single process.
The three algorithms we presented in this thesis are primarily designed for virtual environments
with a centralized implementation. Although it is not our concern in this thesis, one could consider
extending it to multi-robot systems. Any such extension will need to consider several non-trivial
issues, such as distributed implementation, communication constraints, sensing, etc.
Appendix A
DVD Movies
The DVD attached forms a part of this work. The DVD may be played in any DVD player.
Movies:
• LI GUPTA COORDINATION VIDEO (1:46 minutes)
• LI GUPTA ADAPTIVE VIDEO (2:26 minutes)
• LI GUPTA FORMATIONS VIDEO (4:52 minutes)
103
Bibliography
[1] Ken Alton and Ian M. Mitchell. Optimal path planning under different norms in continuous
state spaces. In Proceedings of the IEEE International Conference on Robotics and Automation, pages 866–872, 2006.
[2] Kenneth R. Baker. Introduction to Sequencing and Scheduling. John Wiley and Sons Inc,
1974.
[3] T. Balch and M. Hybinette. Social potentials for scalable multi-robot formations. In Proceedings of IEEE International Conference on Robotics and Automation, pages 73–80, 2000.
[4] J. Barraquand and J. C. Latombe. Robot motion planning: A distributed representation approach. The International Journal of Robotics Research, 10(6):628–649, 1991.
[5] J. Basch, J. Erickson, L. J. Guibas, J. Hershberger, and Li Zhang. Kinetic collision detection
between two simple polygons. ELSEVIER: Computational Geometry: Theory and Applications, 27(3):211–235, 2004.
[6] J. Basch, L. J. Guibas, and J. Hershberger. Data structures for mobile data. In Proceedings of
the Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 747–756, 1997.
[7] O. Burchan Bayazit, Jyh-Ming Lien, and Nancy M. Amato. Better group behaviors in complex
environments using global roadmaps. In Proceedings of International conference on Artificial
life, pages 362–370, 2003.
[8] Osman Burchan Bayazit, Lien Jyh-Ming, and Nancy M. Amato. Probabilistic roadmap motion
planning for deformable objects. In Proceedings of IEEE International Conference on Robotics
and Automation, volume 2, pages 2126–2133, 2002.
[9] Gernot Beer. Programming the boundary element method: an introduction for engineers. John
Wiley and Sons, 2001.
[10] Jacek Blazewicz, Klaus H. Ecker, Erwin Pesch, Gunter Schmidt, and Jan Weglarz. Scheduling
computer and manufacturing processes. Springer, 2001.
[11] O. Brock and O. Khatib. Elastic strips: A framework for motion generation in human environments. International Journal of Robotics Research, 18(6):1031–1052, 2002.
104
BIBLIOGRAPHY
105
[12] Mat Buckland. Programming game AI by example. Wordware Publishing, Inc., Plano, Texas,
2005.
[13] Z. Butler. Corridor planning for natural agents. In Proceedings of IEEE International Conference on Robotics and Automation, pages 499–504, 2006.
[14] Rohit Chandra, Leonardo Dagnum, Dave Kohr, Dror Maydan, Jeff McDonald, and Ramesh
Menon. Parallel programming in OpenMP. Morgan Kaufmann Publishers, San Francisco,
CA, 2001.
[15] Howie Choset, Kevin M. Lynch, Seth Hutchinson, George Kantor, Wolfram Burgard, Lydia E.
Kavraki, and Sebastian Thrun. Principles of Robot Motion: Theory, Algorithms, and Implementations. The MIT Press, 2005.
[16] Laurent D. Cohen and Ron Kimmel. Global minimum for active contour models: A minimal
path approach. International Journal of Computer Vision, 24(1):57–78, 1997.
[17] A. K. Das, R. Fierro, V. Kumar, J. P. Ostrowski, J. Spletzer, and C. J. Taylor. A vision-based
formation control framework. IEEE Transactions on Robotics and Automation, 18(5):813–
825, 2002.
[18] Ingrid Daubechies. Ten Lectures on Wavelets. SIAM: Society for Industrial and Applied
Mathematics, 1992.
[19] Mark de Berg, Marc van Kreveld, Mark H. Overmars, and Otfried Schwarzkopf. Computational Geometry: Algorithms and Applications. Springer-Verlag, 2000.
[20] E. W. Dijkstra. A note on two problems in connection with graphs. Numerische matematik 1,
pages 269–271, 1959.
[21] M. Erdmann and T. Lozano-Perez. On multiple moving objects. In Proceedings of IEEE
International Conference on Robotics and Automation, volume 3, pages 1419–1424, 1986.
[22] E. Fabrizi and A. Saffiotti. Extracting topology-based maps from gridmaps. In Proceedings
of IEEE International Conference on Robotics and Automation, volume 3, pages 2972–2978,
2000.
[23] Russell Gayle, Avneesh Sud, Ming C. Lin, and Dinesh Manocha. Reactive deforming
roadmaps: Motion planning of multiple robots in dynamic environments. In Proceedings of
IEEE/RSJ International Conference on Intelligent Robots and Systems, 2007.
[24] Roland Geraerts and M. H. Overmars. The corridor map method: A general framework for
real-time high-quality path planning. In Proceedings of IEEE International Conference on
Robotics and Automation, 2007.
[25] Roland Jan Geraerts. Sampling-based Motion Planning: Analysis and Path Quality. PhD
thesis, Universiteit Utrecht, Utrecht, the Netherlands, 2006. http://igitur-archive.
BIBLIOGRAPHY
library.uu.nl/dissertations/2006-0509-200010/index.htm,
cessed: August 20, 2008.
106
last
ac-
[26] Sarah F. F. Gibson. 3d chainmail: a fast algorithm for deforming volumetric objects. In
Proceedings of Symposium on Interactive 3D Graphics, pages 149–154, 1997.
[27] Sarah F. F. Gibson and Brian Mirtich. A survey of deformable modeling in computer graphics.
Technical Report TR-97-19, Mitsubishi Electric Research Lab., 1997.
[28] Rafael C. Gonzalez and Richard E. Woods. Digital Image Processing. Prentice Hall, Upper
Saddle River, New Jersey, 2002.
[29] S. Gottschalk, Ming C. Lin, and Dinesh Manocha. OBBTree: A hierarchical structure for rapid
interference detection. Computer Graphics, 30:171–180, 1996.
[30] M. A. Greminger and B. J. Nelson. Deformable object tracking using the boundary element
method. In Proceedings of IEEE Computer Society Conference on Computer Vision and Pattern Recognition, volume 1, pages 289–294, 2003.
[31] M. A. Greminger and B. J. Nelson. Boundary element deformable object tracking with equilibrium constraints. In Proceedings of IEEE International Conference on Robotics and Automation, pages 3896–3901, 2004.
[32] Carlos E. Guestrin, Daphne Koller, and Ronald Parr. Multiagent planning with factored MDPs.
In Proceedings of Advances in Neural Information Processing Systems, pages 1523–1530,
2001.
[33] Carlos E. Guestrin, Shobha Venkataraman, and Daphne Koller. Context-specific multiagent
coordination and planning with factored MDPs. In Proceedings of National Conference on
Artificial Intelligence, pages 253–259, 2002.
[34] Carlos Ernesto Guestrin. Planning under uncertainty in complex structured environments.
PhD thesis, Stanford University, Stanford, CA, USA, 2003. http://ai.stanford.edu/
˜guestrin/Publications/Thesis/thesis.pdf, last accessed: August 20, 2008.
[35] Kenneth E. Hoff, Andrew Zaferakis, Ming C. Lin, and Dinesh Manocha. Fast and simple 2d
geometric proximity queries using graphics hardware. In Proceedings of ACM Symposium on
Interactive 3D Graphics, pages 145–148, 2001.
[36] Kenneth E. Hoff, Andrew Zaferakis, Ming C. Lin, and Dinesh Manocha. Fast 3d geometric
proximity queries between rigid and deformable models using graphics hardware acceleration.
Technical Report TR02-004, Department of Computer Science, University ofNorth Carolina,
2002.
[37] D. Hsu, R. Kindel, J. C. Latombe, and S. Rock. Randomized kinodynamic motion planning
with moving obstacles. International Journal of Robotics Research, 21(3):233–255, 2002.
BIBLIOGRAPHY
107
[38] D. Hsu, J. C. Latombe, and R. Motwani. Path planning in expansive configuration spaces.
International Journal of Computational Geometry and Applications, 9(4/5):495–512, 1999.
[39] A. Kamphuis and M. H. Overmars. Finding paths for coherent groups using clearance. In
Proceedings of ACM SIGGRAPH/Eurographics symposium on Computer animation, pages
19–28, 2004.
[40] A. Kamphuis and M. H. Overmars. Motion planning for coherent groups of entities. In Proceedings of IEEE International Conference on Robotics and Automation, volume 4, pages
3815–3822, 2004.
[41] K. Kant and S. W. Zucker. Toward effcient trajectory planning: The path-velocity decomposition. International Journal of Robotics, 5(3):72–89, 1986.
[42] L. E. Kavraki and J. C. Latombe. Randomized preprocessing of configuration for fast path
planning. In Proceedings of IEEE International Conference on Robotics and Automation,
volume 3, pages 2138–2145, 1994.
[43] L. E. Kavraki, P. Svestka, J. C. Latombe, and M. H. Overmars. Probabilistic roadmaps for
path planning in high-dimensional configuration spaces. IEEE Transactions on Robotics and
Automation, 12(4):566–580, 1996.
[44] Lydia Kavraki and Steve LaValle. Motion Planning, chapter 5, pages 109–131. Springer
Handbook of Robotics. Springer, 2008.
[45] O. Khatib. Real-time obstacle avoidance for manipulators and mobile robots. International
Journal of Robotics Research, 5(1):90–98, 1986.
[46] R. Kimmel and J. A. Sethian. Computing geodesic paths on manifolds. In Proceedings of the
National Academy of Sciences of the United States of America, volume 95, pages 8431–8435,
1998.
[47] R. Kimmel and J. A. Sethian. Optimal algorithm for shape from shading and path planning.
Journal of Mathematical Imaging and Vision, 14(3):237–244, 2001.
[48] S. Koenig and M. Likhachev. Improved fast replanning for robot navigation in unknown terrain. In Proceedings of IEEE International Conference on Robotics and Automation, volume 1,
pages 968–975, 2002.
[49] Jelle R. Kok. Coordination and Learning in Cooperative Multiagent Systems. PhD thesis,
University of Amsterdam, Amsterdam, the Netherlands, 2006. http://staff.science.
uva.nl/˜jellekok/publications/2006/Kok06thesis.pdf, last accessed:
August 20, 2008.
[50] Jelle R. Kok, Matthijs T. J. Spaan, and Nikos Vlassis. Multi-robot decision making using
coordination graphs. In Proceedings of International Conference on Advanced Robotics, pages
1124–1129, 2003.
BIBLIOGRAPHY
108
[51] J. J. Kuffner and S. M. LaValle. RRT-connect: An efficient approach to single-query path
planning. In Proceedings of IEEE International Conference on Robotics and Automation,
volume 2, pages 995–1001, 2000.
[52] A. M. Ladd and L. E. Kavraki. Theoretic analysis of probabilistic path planning. IEEE Transactions on Robotics and Automation, 20(2):229–242, 2004.
[53] Eric Larsen, Stefan Gottschalk, Ming C. Lin, and Dinesh Manocha. Fast proximity queries
with swept sphere volumes. In Proceedings of IEEE International Conference on Robotics
and Automation, pages 3719–3726, 2000.
[54] J. C. Latombe. Robot Motion Planning. Kluwer Academic Publishers, Norwell, MA, USA,
1991.
[55] S. M. LaValle and J. J. Kuffner. Randomized kinodynamic planning. In Proceedings of IEEE
International Conference on Robotics and Automation, volume 1, pages 473–479, 1999.
[56] M. A. Lewis and Kar-Han Tan. High precision formation control of mobile robots using virtual
structures. Autonomous Robots, 4(4):387–403, 1997.
[57] Yi Li and Kamal Gupta. Motion planning of multiple agents in virtual environments on parallel
architectures. In Proceedings of IEEE International Conference on Robotics and Automation,
pages 1009–1014, 2007.
[58] T. Lozano-Perez and M. A. Wesley. An algorithm for planning collision-free paths among
polyhedral obstacles. Communications of the ACM, 22(10):560–570, 1997.
[59] E. Mazer, J. M. Ahuactzin, and P. Bessiere. The ariadne’s clew algorithm. Journal of Artificial
Intelligence Research, 9:295–316, 1998.
[60] P. Melchior, B. Orsoni, O. Lavialle, A. Poty, and A. Oustaloup. Consideration of obstacle
danger level in path planning using A* and fast-marching optimisation: comparative study.
Signal Processing, 83(11):2387–2396, 2003.
[61] N. J. Nilsson. A mobile automation: An application of intelligence techniques. In Proceedings
of International Conference on Artificial Intelligence, pages 509–520, 1969.
[62] P. O’Donnell and T. Lozano-Periz. Deadlock-free and collision-free coordination of two robot
manipulators. In Proceedings of IEEE International Conference on Robotics and Automation,
volume 1, pages 484–489, 1989.
[63] C. O’Dunlaing and C. K. Yap. A retraction method for planning the motion of a disc. Journal
of Algorithms, 6:104–111, 1985.
[64] M. J. Osborne and A. Rubinstein. A Course in Game Theory. MIT Press, 1994.
[65] M. H. Overmars. Algorithms for motion and navigation in virtual environment and games. In
Proceedings of International Workshop on Algorithmic Foundations of Robotics, 2002.
BIBLIOGRAPHY
109
[66] Mark H. Overmars. Motion planning in virtual environments and games, 2004. http://
www.give.nl/movie/publications/ERCIM.php, last accessed: August 20, 2008.
[67] D. K. Pai and L. M. Reissell. Multiresolution rough terrain motion planning. IEEE Transactions on Robotics and Automation, 14(1):19–33, 1998.
[68] Roger E. Pedersen. Game Design Foundations. Wordware Publishing, 2003.
[69] Clement Petres, Yan Pailhas, Pedro Patron, Yvan Petillot, Jonathan Evans, and David Lane.
Path planning for autonomous underwater vehicles. IEEE Transactions on Robotics, 23(2),
2007.
[70] Dave Pottinger. Implementing coordinated movement. Game Developer, February:48–58,
1999.
[71] S. Quinlan and O. Khatib. Elastic bands: connecting path planning and control. In Proceedings
of IEEE International Conference on Robotics and Automation, volume 2, pages 802–807,
1993.
[72] Lennart Rade and Bertil Westergren. Beta: Mathematics Handbook: Concepts, Theorems,
Methods, Algorithms, Formulas, Graphs, Tables. CRC Press, 1993.
[73] C. W. Reynolds. Flocks, herds and schools: a distributed behavioural model. In Proceedings
of the 14th annual conference on Computer graphics and interactive techniques (SIGGRAPH
’87), pages 25–34, 1987.
[74] C. W. Reynolds. Steering behaviors for autonomous characters. In Proceedings of Game
Developers Conference, pages 763–782, 1999.
[75] Marc J. Rochkind. Advanced UNIX Programming. Addison-Wesley Professional, 2004.
[76] G. Sanchez and J. C. Latombe. Using a PRM planner to compare centralized and decoupled planning for multi-robot systems. In Proceedings of IEEE International Conference on
Robotics and Automation, volume 2, pages 2112–2119, 2002.
[77] J. Schwartz and M. Sharir. On the piano movers’ problem: Ii. general techniques for computing
topological properties of real algebraic manifolds. Advances in Applied Mathematics, 4:298–
351, 1983.
[78] T. W. Sederberg and S. R. Parry. Free-form deformation of solid geometric models. Computer
Graphics, 20(4):151–160, 1986.
[79] J. A. Sethian. A fast marching level set method for monotonically advancing fronts. In Proceedings of the National Academy of Sciences of the United States of America, volume 93,
pages 1591–1595, 1995.
[80] J. A. Sethian. Fast marching methods. SIAM Review, 41(2):199–235, 1999.
BIBLIOGRAPHY
110
[81] J. A. Sethian. Level Set Methods and Fast Marching Methods: Evolving Interfaces in Computational Geometry, Fluid Mechanics, Computer Vision, and Materials Science. Cambridge
University Press, Cambridge, UK, 1999.
[82] J. A. Sethian and A. Vladimirsky. Fast methods for the eikonal and related HamiltonJacobi equations on unstructured meshes. Proceedings of the National Academy of Sciences,
97(11):5699–5703, 2000.
[83] T. Simeon, S. Leroy, and J. P. Lauumond. Path coordination for multiple mobile robots: a
resolution-complete algorithm. IEEE Transactions on Robotics and Automation, 18(1):42–49,
2002.
[84] A. Stentz. The focussed D* algorithm for real-time replanning. In Proceedings of the Fourteenth International Joint Conference on Artificial Intelligence, volume 2, pages 1652–1659,
1995.
[85] E. J. Stollnitz, A. D. DeRose, and D. H. Salesin. Wavelets for computer graphics: a primer 1.
IEEE Computer Graphics and Applications, 15(3):76–84, 1995.
[86] E. J. Stollnitz, A. D. DeRose, and D. H. Salesin. Wavelets for computer graphics: a primer 2.
IEEE Computer Graphics and Applications, 15(4):75–85, 1995.
[87] Avneesh Sud, Erik Andersen, Sean Curtis, Ming Lin, and Dinesh Manocha. Real-time path
planning for virtual agents in dynamic environments. In Proceedings of IEEE Virtual Reality,
2007.
[88] P. Svestka and M. H. Overmars. Motion planning for car-like robots, a probabilistic learning
approach. International Journal of Robotics Research, 16:119–143, 1997.
[89] The MOVIE Team at Utrecht University. Coordinating motion for different groups. Technical Report Deliverable 4.2, Utrecht University, 2006. http://www.give.nl/movie/
viewPublicDeliverables.php, last accessed: August 20, 2008.
[90] The OGRE Team. OGRE 3D: Open source graphics engine. http://ogre3d.org/, last
accessed: August 20, 2008.
[91] Adrien Treuille, Seth Cooper, and Zoran Popovic. Continuum crowds. In Proceedings of the
33rd annual conference on Computer graphics and interactive techniques (SIGGRAPH ’06),
pages 1160–1168, 2006.
[92] J. N. Tsitsiklis. Efficient algorithms for globally optimal trajectories. IEEE Transactions on
Automatic Control, 40(9):1528–1538, 1999.
[93] J. P. van den Berg and M. H. Overmars. Prioritized motion planning for multiple robots. In
Proceedings of IEEE/RSJ International Conference on Intelligent Robots and Systems, pages
2217–2222, 2005.
BIBLIOGRAPHY
111
[94] Jur van den Berg, Ming C. Lin, and Dinesh Manocha. Reciprocal velocity obstacles for realtime multi-agent navigation. In Proceedings of IEEE International Conference on Robotics
and Automation, 2008.
[95] Jur van den Berg, Sachin Patil, Jason Sewall, Dinesh Manocha, and Ming C. Lin. Interactive
navigation of individual agents in crowded environments. In Proceedings of Symposium on
Interactive 3D Graphics and Games (I3D), 2008.
[96] Jur Pieter van den Berg. Path Planning in Dynamic Environments. PhD thesis, Universiteit Utrecht, Utrecht, the Netherlands, 2007. http://igitur-archive.library.
uu.nl/dissertations/2007-0404-200447/index.htm, last accessed: August
20, 2008.
[97] C. W. Warren. Multiple robot path coordination using artificial potential fields. In Proceedings
of IEEE International Conference on Robotics and Automation, pages 500–505, 1990.
[98] Liangjun Zhang, Young J. Kim, and Dinesh Manocha. A hybrid approach for complete motion
planning. In Proceedings of IEEE/RSJ International Conference On Intelligent Robots and
Systems, pages 7–14, 2007.