430 likes | 811 Views
Crowd Behavior and Traffic Patterns . COMP 790-058 Robot Motion Planning Fall 2007 Course Lecture Nick Dragan October 22, 2007 UNC Department of Computer Science. Problem Description. Motivation: To realistically simulate crowd behavior in a variety of scenarios
E N D
Crowd Behavior and Traffic Patterns COMP 790-058 Robot Motion Planning Fall 2007 Course Lecture Nick Dragan October 22, 2007 UNC Department of Computer Science
Problem Description • Motivation: • To realistically simulate crowd behavior in a variety of scenarios • Need a good model for specifying the motion of the agents • Agents are in “close geographical or logical states and are affected by each other’s presence and actions” [5] • From the collective motion of all agents, we would like to obtain emergent crowd behavior consistent with real observed crowds
Problem Description (cont.) • Challenges: • Designing a model that • scales well to crowds of varying densities • transfers well to environments of varying complexity • Quantification of existing (qualitative) models from social sciences and psychology and their efficient implementation • Limited data
Flocking Behavior • Flocks, Herds, and Schools: A Distributed Behavioral Model (1987) [1] • Generalization of particle systems • Each bird in the flock is represented as an “intelligent” particle, choosing its individual path based on • Its local perception of the dynamic environment • Laws of physics that rule its motion • Set of programmable behaviors • Simple physical model of geometric flight with conservation of momentum
Flocking Behavior • Flock model • Implemented behaviors (in order of decreasing precedence): • Collision avoidance: avoid collisions with nearby flockmates • Velocity matching: attempt to match velocity with nearby flockmates • Flock centering: attempt to stay close to nearby flockmates
Flocking Behavior • Simulated perception: • Each bird has a limited, localized view of the world via a “spherical zone of sensitivity” • Magnitude of sensitivity is proportional with the inverse square of distance • Allows the bird to coordinate its behavior with nearby flockmates • This produces emergent flocking behavior
Flocking Behavior • Collision Avoidance: • Force field model • A field of repulsion force emanates from the obstacle • Steer-to-avoid • Bird redirects its movement to a point one body length beyond the point of impact • Both models are fairly simple and do not handle arbitrary convex polyhedral obstacles well • But, can handle dynamic obstacles and the flock can split into subgroups to maneuver around obstacles
Flocking Behavior • Algorithm: • O(n2): in a naïve implementation, each bird in the flock must at least consider every other bird • Can be optimized via “dynamic spatial partitioning” of the flock • “Incremental collision detection” algorithm runs in linear time
Roadmap-based Flocking • Roadmap-Based Flocking for Complex Environments (2002) [2] • Builds upon the previous work • Addition of global information in the form of a roadmap enables several new flocking behaviors • Homing • Exploring • Shepherding
Roadmap-based Flocking • Querying a PRM roadmap (C-space) • Roadmap contains topological information and adaptive edge weights
Roadmap-based Flocking • Group Behaviors • Homing • Move the entire flock from a starting position to a goal position • Exploring • Covering: individual members attempt to visit all points in the scene • Goal Searching: individual agents search for an unknown goal; once located, all flock members move there • Shepherding • Flock is steered by an external agent
Roadmap-based Flocking • Homing • Algorithm overview • Path to goal is discretized to subgoals based on an individual flock member’s sensor range • Interacting forces from neighboring flock members and obstacles have higher priority than steering toward a subgoal • Flock members move together toward goal • Results • ~10x faster than grid-based A*, much better at handling local minima
Roadmap-based Flocking • Exploring: Covering • Algorithm overview: • As flock members traverse a roadmap edge, its weight increases • Flock members are biased toward roadmap edges with smaller weights • -> Flock members gravitate to unexplored areas of the roadmap • Results • Covers 92% within 90 seconds and 99% within 150 seconds; basic flocking behavior using a random walk does not find more than 90%
Roadmap-based Flocking • Exploring: Searching for an unknown goal • Algorithm overview: • Roadmap edge weights dictate how promising a path segment is • If an agent discovers a goal, it increases the weight of the edges the edges on the route it took • If an agent encounters a dead-end or a cycle, the weight of the edges is decreased • Results • On average only 5 seconds slower at finding the goal and getting flock members to it than the method with a known goal location
Roadmap-based Flocking • Shepherding • Algorithm overview: • An outside agent guides the flock to a predefined goal • Positions itself behind the flock on the far side of a subgoal • Flock is inclined to move away from the agent • Results • ~5x fewer steps to goal, ~4x fewer local minima encountered compared to a grid-based A* method
Escape Panic Behavior • Simulating dynamical features of escape panic (2000) [4] • Uses the model of pedestrian behavior [3] to investigate escape panics • Characteristic features of panic behavior: • People try to move considerably faster than normal • Physical interactions through pushing • Passing of a bottleneck becomes incoordinated • Arching and clogging at exits • Jams build up (up to 4,450 Newtons per meter) • Escape slowed down by fallen people turning into obstacles • Tendency of mass behavior • Alternative exits not efficiently used
Escape Panic Behavior • Simulating dynamical features of escape panic (2000) [4] • Uses the model of pedestrian behavior [3] to investigate escape panics • Preconditions of panic • Jamming by incoordination • Collective behavior modeled as a “self-driven many-particle system,” combining socio-psychological and physical forces for agent movement
Escape Panic Behavior • Characteristic features: • People try to move considerably faster than normal • Physical interactions through pushing • Passing of a bottleneck becomes incoordinated • Arching and clogging at exits • Jams build up (up to 4,450 Newtons per meter) • Escape slowed down by fallen people turning into obstacles • Tendency of mass behavior • Alternative exits not efficiently used
Escape Panic Behavior • Acceleration of an agent • vi0(t) = desired speed • ei0(t) = desired direction • vi(t) = actual velocity • τi = characteristic time • mi = mass
Escape Panic Behavior • Sum of forces of person j on person i is fij • kg(rij – dij)nij = “body force” • other people’s bodies being in the way • κg(rij – dij)Δvtijtij = “sliding friction force” • impedes relative tangential motion • tij is the tangential direction • Δvtij is the tangential velocity difference • k and κ are constants • Aiexp[(rij – dij)/Bi]nij = psychological “force” • tendency to avoid each other • rij is the sum of the people’s radii, dij is the distance between their centers of mass, nij is the normalized vector from j to i, Ai and Bi are constants
Escape Panic Behavior • Forces from walls are calculated in basically the same way as forces from other people
Escape Panic Behavior • Values Used for Constants and Parameters • Values chosen to match flows of people through an opening under non-panic conditions • People are modeled as the same except for their radius • Insufficient data on actual panic situations to analyze the algorithm quantitatively
Escape Panic Behavior • Simulation of clogging • As desired speed increases beyond 1.5m s-1, it takes more time for people to leave • As desired speed increases, the outflow of people becomes irregular • Arch shaped clogging occurs around the doorway
Escape Panic Behavior Simulation of clogging
Escape Panic Behavior Widening Can Create Crowding
Escape Panic Behavior • Mass behavior • Panicking people tend to exhibit herding behavior • Herding simulated using “panic parameter” p
Escape Panic Behavior Effects of Herding
Escape Panic Behavior Injured People Block Exit
Escape Panic Behavior A Column Can Increase Outflow
Escape Panic Behavior • Findings • Bottlenecks cause clogging • Asymmetrically placed columns around exits can reduce clogging and prevent build up of fatal pressures • A mixture of herding and individual behavior is ideal
High Density Crowd Sim. • Controlling Individual Agents in High-Density Crowd Simulation (2007) [5] • One of the first works to realistically animate high density crowds • Psychological and geometrical rules layered on top of and extending a parametrized social forces model • Can handle high density crowds in tight spaces • Unlike Helbing’s model which produces vibrating agent movement
High Density Crowd Sim. • HiDAC system • High-level behavior: navigation, learning, communication between agents, and decision-making • Low-level motion: perception and a set of reactive behaviors for collision avoidance, detection and response • Personality variables: psychological (impatience, panic) and physiological factors (speed, weight); ->heterogeneous crowds
High Density Crowd Sim. • Exhibits a number of emergent behaviors • Preventing agents from appearing to vibrate • Creating natural bi-directional flow rates • Queuing and other organized behavior • Pushing through a crowd • Agents falling and becoming obstacles • Propagating panic • Exhibiting impatience • Reacting in real time to changes in the environment
High Density Crowd Sim. • Movement of agent i (FiTo) depends on • desired attractor (FiAt) • walls w (FwiWa) • obstacles k(FkiOb) and • other agents j (FjiOt) • trying to keep its previous direction of movement to avoid abrupt changes in its trajectory (FiTo[n −1]). • Different weights wi
High Density Crowd Sim. • Position of agent ipi [n+1] depends on • Where vi[n] is the magnitude of the velocity in the simulation step n. The velocity at each time step is calculated as: where a is a constant that represents the acceleration of the agent when it starts walking until it reaches viMAX.
High Density Crowd Sim. • ri is the result of the repulsion forces that affect the agent when it overlaps with a wall, obstacle or another agent • α represents whether the agent will move in this step in its desired direction of movement or instead be pushed by a repulsion force. • βi is used to give priority to avoiding fallen agents on the floor • FiFais the avoidance force to avoid fallen agents • T is the increment in time between simulation steps
Escape Panic Behavior • Results • For a complex environment with 85 rooms and 53,448 vertices: • Simulation only: 25fps for 1800 agents • Simulation and 3D rendering of agents: 25fps for 600 agents x 100 vertices
Literature • [1] C.W. Reynolds, Flocks, Herds, and Schools: A Distributed Behavioral Model, in Computer Graphics, 21(4) (SIGGRAPH '87 Conference Proceedings) pages 25-34. • [2] O. Burchan Bayazit, Jyh-Ming Lien, and Nancy M. Amato: Roadmap-Based Flocking for Complex Environments, The Workshop on Algorithmic Foundations of Robotics (WAFR), December 2002. • [3] A Mathematical Model for the Behavior of Pedestrians. Dirk Helbing. Behavioral Science 36, 298-310 (1991). • [4] D. Helbing, I. Farkas, T. Vicsek: Simulating dynamical features of escape panic, Nature 407: 487 (2000). • [5] N. Pelechano, J. Allbeck and N. Badler. Controlling Individual Agents in High-Density Crowd Simulation. ACM SIGGRAPH / Eurographics Symposium on Computer Animation (SCA) 2007 August 3-4, San Diego.