From Path Planning to Crowd Simulation

Slides:



Advertisements
Similar presentations
Lecture 7: Potential Fields and Model Predictive Control
Advertisements

AI Pathfinding Representing the Search Space
Controlling Individual Agents in High Density Crowd Simulation N. Pelechano, J.M. Allbeck and N.I. Badler (2007)
Motion Planning for Point Robots CS 659 Kris Hauser.
Crowds In A Polygon Soup Next-Gen Path Planning David Miles 3/23/2006 Copyright 2006 BabelFlux LLC.
Crowds In A Polygon Soup Next-Gen Path Planning David Miles 3/23/2006.
NUS CS5247 Motion Planning for Camera Movements in Virtual Environments By Dennis Nieuwenhuisen and Mark H. Overmars In Proc. IEEE Int. Conf. on Robotics.
By Lydia E. Kavraki, Petr Svestka, Jean-Claude Latombe, Mark H. Overmars Emre Dirican
Roland Geraerts and Mark Overmars ICRA 2007 The Corridor Map Method: Real-Time High-Quality Path Planning.
Way to go: A framework for multi-level planning in games Norman Jaklin Wouter van Toll Roland Geraerts Department of Information and Computing Sciences.
1st Meeting Industrial Geometry Computational Geometry ---- Some Basic Structures 1st IG-Meeting.
Crowd Simulation Sai-Keung Wong. Crowd Simulation A process of simulating the movement of a large number of entities or characters. While simulating these.
Randomized Motion Planning for Car-like Robots with C-PRM Guang Song and Nancy M. Amato Department of Computer Science Texas A&M University College Station,
1 Last lecture  Configuration Space Free-Space and C-Space Obstacles Minkowski Sums.
C ROWD P ATCHES : P OPULATING L ARGE - S CALE V IRTUAL E NVIRONMENTS FOR R EAL -T IME A PPLICATIONS Barbara Yersin, Jonathan Maïm, Julien Pettré, Daniel.
Presenter: Robin van Olst. Avneesh SudRussell Gayle Erik Andersen Stephen GuyMing Lin Dinesh Manocha.
Simulating Virtual Human Crowds with a Leader-Follower Model Tsai-Yen Li, Ying-Juin Jeng, Shih-I Chang National Chengchi University Slides updated and.
Crowds Andrew Kaufman Michael Welsman-Dinelle. What is a crowd? A group of agents performing actions. Agents can affect each other. Agent actions may.
Randomized Motion Planning for Car-like Robots with C-PRM Guang Song, Nancy M. Amato Department of Computer Science Texas A&M University College Station,
Continuum Crowds Adrien Treuille, Siggraph 王上文.
CS 326 A: Motion Planning robotics.stanford.edu/~latombe/cs326/2003/index.htm Configuration Space – Basic Path-Planning Methods.
1 Seminar Crowd Simulation Introduction. 2 Who am I?  Roland Geraerts  Assistant professor  Robotics background  Research on path planning and crowd.
CS 326A: Motion Planning Basic Motion Planning for a Point Robot.
Chapter 5: Path Planning Hadi Moradi. Motivation Need to choose a path for the end effector that avoids collisions and singularities Collisions are easy.
Real-time Crowd Movement On Large Scale Terrains Speaker: Alvin Date:4/26/2004From:TPCG03.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Constraint-Based Motion Planning using Voronoi Diagrams Maxim Garber and Ming C. Lin Department of Computer.
Steering Behaviors For Autonomous Characters
1 Path Planning Introduction. 2 Who am I?  Roland Geraerts  Robotics background  Research on path planning and crowd simulation  Assistant professor.
Navigation Meshes for Realistic Multi-Layered Environments Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts Utrecht University, The Netherlands.
Probabilistic Roadmaps for Path Planning in High-Dimensional Configuration Spaces Kavraki, Svestka, Latombe, Overmars 1996 Presented by Chris Allocco.
Chapter 5.4 Artificial Intelligence: Pathfinding.
Probabilistic Roadmaps for Path Planning in High-Dimensional Configuration Spaces Lydia E. Kavraki Petr Švetka Jean-Claude Latombe Mark H. Overmars Presented.
Multi-Layered Navigation Meshes Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts ICT.OPEN 2011.
Ioannis Karamouzas, Roland Geraerts, Mark Overmars Indicative Routes for Path Planning and Crowd Simulation.
A Navigation Mesh for Dynamic Environments Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts CASA 2012.
Chapter 5.4 Artificial Intelligence: Pathfinding.
© Manfred Huber Autonomous Robots Robot Path Planning.
Flow Fields Hao Li and Howard Hamilton. Motivation for Flow Fields Multiple AI algorithms in a computer game can produce conflicting results. The AI must.
Using the Corridor Map Method for Path Planning for a Large Number of Characters Roland Geraerts, Arno Kamphuis, Ioannis Karamouzas, Mark Overmars MIG’08.
Path Planning for a Point Robot
Probabilistic Roadmaps for Path Planning in High-Dimensional Configuration Spaces (1996) L. Kavraki, P. Švestka, J.-C. Latombe, M. Overmars.
Roland Geraerts Seminar Crowd Simulation 2011
Motion Planning in Games Mark Overmars Utrecht University.
Adrian Treuille, Seth Cooper, Zoran Popović 2006 Walter Kerrebijn
Crowds (and research in animation and games) CSE 3541 Matt Boggus.
Learning to Navigate Through Crowded Environments Peter Henry 1, Christian Vollmer 2, Brian Ferris 1, Dieter Fox 1 Tuesday, May 4, University of.
UNC Chapel Hill M. C. Lin Introduction to Motion Planning Applications Overview of the Problem Basics – Planning for Point Robot –Visibility Graphs –Roadmap.
Wouter G. van Toll Atlas F. Cook IV Roland Geraerts Realistic Crowd Simulation with Density-Based Path Planning ICT.OPEN / ASCI October 22nd, 2012.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Behavioral Animation: Crowds.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Behavioral Animation: Crowds.
Autonomous Robots Robot Path Planning (3) © Manfred Huber 2008.
Roland Geraerts and Erik Schager CASA 2010 Stealth-Based Path Planning using Corridor Maps.
Constraint-Based Motion Planning for Multiple Agents Luv Kohli COMP259 March 5, 2003.
Autonomous Robots Robot Path Planning (2) © Manfred Huber 2008.
Crowds (and research in computer animation and games)
CS 326A: Motion Planning Probabilistic Roadmaps for Path Planning in High-Dimensional Configuration Spaces (1996) L. Kavraki, P. Švestka, J.-C. Latombe,
Schedule for next 2 weeks
Indicative Routes for Path Planning and Crowd Simulation
A Comparative Study of Navigation Meshes . Motion in Games 2016
A Comparative Study of Navigation Meshes . Motion in Games 2016
Crowd Simulation (INFOMCRWS) - Introduction to Crowd Simulation
Crowds (and research in computer animation and games)
A Comparative Study of Navigation Meshes
Roland Geraerts and Mark Overmars CASA’08
Crowd Simulation (INFOMCRWS) - UU Crowd Simulation Software
Workshop II UU Crowd Simulation Framework
Toward Solving Pathfinding
Robotics meet Computer Science
Planning.
Classic Motion Planning Methods
Presentation transcript:

From Path Planning to Crowd Simulation Roland Geraerts 3 September 2015 See http://www.cs.uu.nl/~roland for more information on our path planning and crowd simulation research. Our crowd simulation framework is described in the following paper: Wouter G. van Toll, Norman S. Jaklin, Roland Geraerts. Towards Believable Crowds: A Generic Multi-Level Framework for Agent Navigation. In ICT.OPEN 2015. Download: http://www.staff.science.uu.nl/~gerae101/pdf/Towards_believable_crowds_-_A_generic_multi-level_framework_for_agent_navigation_ASCI_Open_2015.pdf.

Path planning

Path planning and crowd simulation Goal: bring characters from A to B in an environment Also vehicles, animals, camera, a formation,… Requirement: fast and flexible Real-time planning for thousands of characters Individuals and groups Dealing with local hazards Different types of environments Requirement: realistic paths For example, the way humans move Low energy usage (smooth, short, minimal rotation/acceleration) Keep some distance (clearance) to obstacles Social behavior and rules (collision avoidance) …

Social relevance of simulation Crowd simulation is needed for Simulations of the real world Improving crowd flow, predicting crowd pressures, planning evacuation routes Replacement of big-scale exercises Hard and expensive to organize: 500+ people No impact on environment and surroundings Populating game worlds Game world Rebuilding of train station Evacuation in sports stadiums Love Parade in Duisburg, 2010

A computational model of human navigation Challenge: Unify dispersed models for realistic, individual, small group, and collective human movements in interactive, heterogeneous environments. Dispersed models Agent-based: individuals, but problems with high densities Flow-based: no individuals, but good for high densities Realistic movements Comprise collaboration, smooth and energy-efficient movement, collision avoidance, and dealing with unrealistic congestions. Interactive environment Geometry can change dynamically, and the crowd has to react. Heterogeneous environment People need to take logical, distinct, and realistic paths over heterogeneous terrains in the environment.

Are we there yet?

Path planning errors in games Networks of waypoints are incorrect Hand designed Do not adapt to changes in the environment Do not adapt to the type of character Local methods fail to find a route Keep stuck behind objects Lead to repeated motion Groups split up Not planned as a coherent entity Paths are unnatural Not smooth Stay too close to network/obstacles Methodology is not general enough to handle all problems Titan Quest: Immortal throne

Path planning algorithms Method: Flocking Separation: steer to avoid crowding local units Alignment: steer towards the average heading of local units Cohesion: steer to move toward the average position of local units Advantages Natural behavior for certain animals Disadvantages Coherent group behavior is hard Trapped in local minima Flocking (Reynolds): see http://www.red3d.com/cwr/boids/ Other methods: scripting, cheating Reynolds, 1987: Flocks, Herds, and Schools: A Distributed Behavioral Model

Path planning algorithms Method: A* Construction phase: create a grid, mark free/blocked cells Query phase: use A* to find the shortest path (in the grid) Advantage Simple Disadvantages Too slow in large scenes Ugly paths Little clearance to obstacles Unnatural motions, e.g. sharp turns Fixed paths Predictable motions Paths resulting from A* algorithms tend to have little clearance to obstacles and can be aesthetically unpleasant, so care must be taken to smooth them. See http://theory.stanford.edu/~amitp/GameProgramming for more information/theory on A*. Major improvements: See e.g.: Field D*: An interpolation-based path planner and replanner (Dave Ferguson and Anthony Stentz) Hart et al, 1968: A Formal Basis for the Heuristic Determination of Minimum Cost Paths

Path planning algorithms Method: Potential Fields Goal generates attractive force Obstacles generate repulsive force Follow the direction of steepest descent of the potential toward the goal Advantages Flexibility to avoid local hazards Smooth paths Disadvantages Expensive for multiple goals Local minima Continuum crowds (picture): http://grail.cs.washington.edu/projects/crowd-flows/continuum-crowds.pdf Continuum crowds Treuille et al, 2006: Continuum crowds; Latombe, 1991: Robot motion planning

Path planning algorithms Method: Probabilistic Roadmap Method Construction phase: build the roadmap Query phase: query the roadmap Advantages Reasonably fast High-dimensional problems Disadvantages Ugly paths Fixed paths Predictable motions Lacks flexibility when environment changes or obstacles are added Storage can be expensive Kavraki et al, 1996: Probabilistic roadmaps for path planning in high-dimensional configuration spaces

Path planning algorithms Method: Navigation meshes Create a representation of the "walkable areas" of a scene Extract the path Advantages General approach Construction is fast on the GPU code.google.com/p/recastnavigation Disadvantages Often needs much manual editing Current techniques are imprecise Bad support for terrains No automatic annotations (games) Areas: walk, climb Places: hiding and sniper spots Obstacles Walkable voxels http://www.navpower.com/technology.html http://www.gamedev.net/community/forums/topic.asp?topic_id=258561 http://aigamedev.com/open/article/halo-ai/ Raycast navigation code: see http://code.google.com/p/recastnavigation Some open problems Automatic annotation of the map Areas: walk, climb, jump, crouch, “avoid” … Special places: hiding and sniper spots, … Handle large (dynamic) changes Efficiently updating the data structure and paths Improve the efficiency of mesh generation (large scenes) Wrong coverage/connectivity due to confusing elements Steep stairs, ramps, hills, curved surfaces, gaps The mesh is only a data structure storing the walkable areas How to create visually convincing paths? Voxel regions Polygonal regions Mononen, 2015: Recastnavigation Convex regions A path

Do we need a new path planning algorithm? differences Robotics Virtual environments Nr. entities a few robots many characters Nr. DOFs many DOFs a few DOFs CPU time much time available little time available Interaction anti-social social Type path nice path realistic path Correctness fool-proof may be incorrect Path planning has been studied extensively in Robotics

Surface-based navigation We need a paradigm shift from graph-based to surface-based navigation Graph-based navigation: little support for route deviation Hard to avoid expected collision between humans Hard to support differently sized humans/groups Costly to deal with dynamic changes in the environment Hard to efficiently deal with heterogeneous regions Human navigation is surface-based A graph is a data structure that can represent the navigable routes in an envi-ronment [7,36,79]. Its nodes represent key positions in the environment which are con-nected through its edges representing routes. Crowd simulation algorithms that are based on this representation suffer from too little support of required deviation from these routes, e.g. to avoid expected collisions between humans, to support differently sized humans/groups, and to deal with dynamic changes in the environment (e.g. a bridge that partially collapses) [73]. In contrast, surface-based representations [24,39,72] handle these problems better because they do support deviation from these routes. In addition, human navigation seems to be surface-based since humans do not walk over imaginary lines but towards areas on a surface.

Crowd simulation framework We need a fast and generic framework Representation of the environment Representation environment Level 5 Plans actions Level 4 Creates indicative routes Level 3 Traverses the routes Yields speed/direction pairs Level 2 Adapts routes E.g. to avoid collisions Level 1 Moves the characters See N.S. Jaklin, W.G. van Toll, and R. Geraerts. Way to go - A framework for multi-level planning in games. In International Planning in Games Workshop (in ICAPS), pp. 11–14, 2013. At the top of the hierarchy, event management and action planning (5) generate a set of geometric path planning queries, consisting of start/goal pairs. Next, the global route planning level (4) uses a query to produce an indicative route for a human or group, based on e.g. crowd densities, terrain preferences, visual information, and global coordination. The three lower levels move the crowd in every step of the simulation. On the route following level (3), the global routes are being traversed, yielding preferred velocities (i.e. speed/direction pairs). These are adapted in the local movement level (2) where a human might temporarily deviate from its global route to coordinate its movements and to handle potential collisions with the crowd, yielding a velocity that the animation system (1) uses to move a human. Van Toll, Jaklin, and Geraerts, 2015. Towards Believable Crowds: A Generic Multi-Level Framework for Agent Navigation.

Crowd simulation framework Representation of the environment Representation environment Level 5 Plans actions Level 4 Creates indicative routes Level 3 Traverses the routes Yields speed/direction pairs Level 2 Adapts routes E.g. to avoid collisions Level 1 Moves the characters Van Toll, Jaklin, and Geraerts, 2015. Towards Believable Crowds: A Generic Multi-Level Framework for Agent Navigation.

Representation of the traversable environment Comparison of navigation meshes Triangles [Kallmann] Disks [Pettré et al] Polygons [Mononen] Corridor Map [Geraerts] Exact representation x Linear memory 3D environments Variable unit widths Dynamic obstacles NOT! Kallmann: http://graphics.ucmerced.edu/papers/10-mig-navq.pdf Pettré: http://vrlab.epfl.ch/~jpettre/publis/05vcrowdpettre.pdf Mononen: http://code.google.com/p/recastnavigation Geraerts: http://www.cs.uu.nl/~roland/pdf/ecm.pdf 3D environments  represents the walkable surfaces in a 3D environment

Representation of the traversable environment Requirements Path existence 100% coverage of the navigable space All cycles Flexible: surfaces Fast computation and small storage Fast query time during simulation

Representation of the traversable environment Navigation mesh Voronoi diagram / Medial axis Voronoi sites: red points Voronoi sites: red/black lines

Representation of the traversable environment Navigation mesh Voronoi diagram / Medial axis From a graph to a surface representation Closest point annotation

Representation of the traversable environment Navigation mesh Voronoi diagram / Medial axis From a graph to a surface representation Closest point annotation Computation Approximation on the GPU Exact computation on the CPU: Vroni, Boost Both have to deal with precision issues GPU computation: see e.g. http://www.staff.science.uu.nl/~gerae101/pdf/GPGPU-Accelerated_Construction_of_High-Resolution_Generalized_Voronoi_Diagrams_and_Navigation_Meshes_MIG2014.pdf.

Representation of the traversable environment Navigation mesh Extension to 3D environments Split environment into 2D layers Too hard to compute optimally GPU computation: see e.g. http://www.staff.science.uu.nl/~gerae101/pdf/GPGPU-Accelerated_Construction_of_High-Resolution_Generalized_Voronoi_Diagrams_and_Navigation_Meshes_MIG2014.pdf.

Representation of the traversable environment Navigation mesh Extension to 3D environments Split environment into 2D layers Too hard to compute optimally Stitch the navigation meshes on the layers together Fast to compute: multi-layerd: 46ms; city: 0.3s

Representation of the traversable environment Extension to 2.5D (multi-layered) environments Technique Multi-layered environment Partial medial axes for Li and Lj Connection scene Updated medial axes for Li and Lj Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts Navigation Meshes for Realistic Multi-Layered Environments. Appears in IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS'11), 2011. Full text [pdf] http://people.cs.uu.nl/roland/pdf/navmesh.pdf

Representation of the traversable environment Result 10 ms Fast to compute: multi-layerd: 46ms; city: 0.3s

Representation of the traversable environment Navigation mesh Fast to compute 10 ms 115 ms 3 s

Representation of the traversable environment Can be huge E.g. 1 km2

Representation of the traversable environment Navigation mesh Handles dynamic changes Update costs < 1 ms

Representation of the traversable environment Navigation mesh Exact representation Captures 100% of the free space Captures all homotopically different routes (cycles) Allows fast extraction of global routes and final paths Nice mathematical properties Fast to compute – O(n log n) Small data structure – O(n) Nearest obstacle computation – O(1) 2D algorithms also work in ML environments Fast to compute: multi-layerd: 46ms; city: 0.3s

Crowd simulation framework Representation of the environment Representation environment Level 5 Plans actions Level 4 Creates indicative routes Level 3 Traverses the routes Yields speed/direction pairs Level 2 Adapts routes E.g. to avoid collisions Level 1 Moves the characters See N.S. Jaklin, W.G. van Toll, and R. Geraerts. Way to go - A framework for multi-level planning in games. In International Planning in Games Workshop (in ICAPS), pp. 11–14, 2013. At the top of the hierarchy, event management and action planning (5) generate a set of geometric path planning queries, consisting of start/goal pairs. Next, the global route planning level (4) uses a query to produce an indicative route for a human or group, based on e.g. crowd densities, terrain preferences, visual information, and global coordination. The three lower levels move the crowd in every step of the simulation. On the route following level (3), the global routes are being traversed, yielding preferred velocities (i.e. speed/direction pairs). These are adapted in the local movement level (2) where a human might temporarily deviate from its global route to coordinate its movements and to handle potential collisions with the crowd, yielding a velocity that the animation system (1) uses to move a human.