430 likes | 723 Views
Path Planning. Introduction. Who am I?. Roland Geraerts Robotics background Research on path planning and crowd simulation Assistant professor Software package. Who are you?. Master GMTE? Course Motion and Manipulation? Interest in games? Why do you follow this course?
E N D
Path Planning Introduction
Who am I? • Roland Geraerts • Robotics background • Research on path planning andcrowd simulation • Assistant professor • Software package
Who are you? • Master GMTE? • Course Motion and Manipulation? • Interest in games? • Why do you follow this course? • Interest in thesis projects? • Who has exciting hobbies?
Learning goals of the course • To become an expert in path planning and crowd simulation • Study and discuss many papers • To understand the limitations of current techniques • Determine the limitations and open problems in the papers • To become a very critical reader • Hand in many assessments of papers • Actively participate in discussions • To understand the state-of-the-art in current games and how this could be improved • Study path planning and crowd simulation in existing games • Write paper about the applicability of new techniques (*)
Learning goals of the course • To understand crowd simulation frameworks • Follow the workshop • Integrate some code into a framework (*) • To improve further upon your scientific skills • Participate in discussions and lead them • Give better presentations • Know how to set up experiments better (workshop) • Write better review reports and assessments
Why this course • Path planning and crowd simulation are important research topics in Utrecht • Roland Geraerts, Frank van der Stappen, Wouter van Toll, Norman Jaklin, Arne Hillebrand, Sybren Stüvel • Relation to animation research (Arjan Egges, Nicolas Pronost) • Many research projects • Gate • Commit • Commands • Thesis and PhD projects • Much interest from the industry
Practical aspects • Meetings • Tuesday 9.00 - 10.45 in UNNIK-517 • Thursday 15.15 - 17.00 in ISRAELS-002 (Israëlslaan 118) • Presence is mandatory • If you cannot come for whatever reason • Hand in abstracts (on paper) during the meeting • Website • http://www.cs.uu.nl/docs/vakken/mpap/ • Check the schedule • Check regularly for announcements and changes • Download papers • Find the secret page
Assignments • Present two papers • Contents (10 min.), critical review (15 min.), discussion (15 min.) • Write paper abstracts/assessments • Only read the paper before your presentation • One page per paper • Short abstract in your own words • Critical assessment • Main limitations and open problems • Surprising and innovative elements • Do the authors claim too much, make many assumptions, draw conclusions that are too general, not correctly setup their experiments? • Three questions or points for discussion • Hand in the two pages (on paper) on the day of the presentation • Use headings: Summary, Assessment, Questions
Assignment 1 • Study path planning/crowd simulation in a modern game • Deliberately try to create problems • Destroy objects/buildings • Stand in the way of moving characters • Park a car on the sidewalks • Let a character follow you while traversing a `difficult route’
Assignment 1 • Collect video footage of issues that go wrong due to • Collision-avoidance with entity, group of entities, or obstacle; e.g. a character • gets blocked; • takes an illogical detour; • does not avoid congested areas; • passes through an obstacle or another character; • makes sudden undesired directional changes; • does not look ahead; • walks through a group of interacting characters. • Poor path planning and animation; e.g. a character • collides with another animated character; • takes an illogical detour (e.g. a shorter path exists that requires jumping or climbing); • takes an illogical action (e.g. it may walk through an object while jumping would be more logical).
Assignment 1 • Procedure • Investigate what goes wrong • Make one video • Use a 720p or 1080p resolution if possible; • Compress your movie, and use a high bit-rate for the movie; • Convert the video to a WMV-file • Use e.g. Fraps for recording the movie • You may include multiple examples • Don't use transitions (e.g. fades) between clips or overlays (e.g. text); • Present 3 slides next Tuesday (September 16) for discussion • Name of the game, your names, picture, type of game • The video • Description of what goes wrong and why (according to you) • Take with you on USB stick • Explain and discuss (5 minutes)
Assignment 2 • Choose between writing a paper or implementation • Deadline • November 4 (23.59) • Use the Submit system • Paper on path planning/crowd simulation in games • Based on the problems extracted from assignment 1 • Write a paper (10 pages) on how these problems can be solved • Audience: a recommendation for the programmer of the game • Try to be as critical on your own paper as you were on the paper you have reviewed • Implement the RVO2 collision-avoidance method into our Crowd simulation framework • C++ • Compare this method with two other (already integrated) methods • A fair comparison is important • Write a report
Grading • Game study 5% • Presentations 20% + 20% • Abstracts 30% • Paper/implementation 25% • To qualify for second change exam • The original mark should at least be a 4; • Actively participate in at least 13/17 of the meetings; • Write at least 20/26 abstracts; • Give both presentations satisfactory.
Grading • You cannot pass the course if you skip • assignment 1 or 2; • one of your presentations; • 5 or more meetings (out of 17 meetings); • 7 or more abstracts (out of 26 abstracts).
Workshops • Workshop 1 • September 18 • Crowd simulation • Software and framework • Collision-avoidance algorithms • C++ • Experimental research • Workshop 2 • November 4 • A* Search • Understand the A* algorithm • Reason about its properties • Apply it to a range of problems
Path planning • Goal: bring characters from A to B through 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
Path planning • Goal: bring characters from A to B through 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: visually convincing 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) • …
Path planning algorithms in games • Scripting • Local approaches • Flocking • Cheating • Networks of waypoints • Grid-based A* Algorithms • Navigation meshes
Do we need a new path planning algorithm? differences 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 pathnice path visually convincing path Correctness fool-proof may be incorrect
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
What we study in the course • Methodology/framework that solves these problems • Developed in Utrecht (still in development) • Applications (characters, cameras, groups, crowds, …) • Local character behavior • How do people walk toward locations? • How do they avoid each other? • Must a path planning algorithm compute a path? • Crowd behavior • Flow models • Planning approaches • Massive crowds • Crowd evaluation
The Explicit Corridor Map: Full/generic representation free space • The Explicit Corridor Map • Navigation mesh, or: a system of collision-free corridors • Data structure: Medial axis + closest points to obstacles • Computed efficiently by using the GPU or CPU Explicit Corridor Map (2D) Explicit Corridor Map (multi-layered)
The Explicit Corridor Map:Experiments Footprint and Explicit Corridor Map: 0.3s City environment
Corridors [macro scale] • Computing a corridor: provides a global route • Connect the start and goal to the medial axis • Find corresponding shortest path in graph • Corridor: concatenation of cells of the ECM Corridor A corridor with small obstacles
The Indicative Route Method [meso scale] • The Indicative Route Method • A path planning algorithm should NOT compute a path • A one-dimensional path limits the character’s freedom • Humans don’t do that either • It should produce • An Indicative/Preferred Route • Guides character to goal • It uses a corridor • Provides a global route • Allows for flexibility
The Indicative Route Method [meso scale] • “Algorithm” • Compute a collision free indicative route from A to B • Compute a corridor containing the route • Move an attraction point along the indicative route • The attraction point attracts the character • The boundary of the corridor pushes it away • Other characters and local hazards push the character away
Local method [micro scale] • Boundary force • Find closest point on corridor boundary • Perpendicular to boundary • Increases to infinity when closer to boundary • Force is 0 when clearance is large enough (or when on the MA) • Depends on the maximal speed of the character • Should be chosen such that oscillations are avoided • Steering force • Towards attraction point • Can be constant • Obtain path • Force leads to an acceleration term • Integration over time, update velocity/position/attraction point • Yields a smooth (C1-continuous) path
IRM method • Resulting vector field • Indicative Route is short path
IRM method:Experiments City environment Corridor and path: 2.8ms
Crowd simulation • Method can plan paths for a large number of characters • Force model is used for local avoidance • Path variation models are integrated, adding more realism • Additional models can be incorporated easily • Goal-oriented behavior • Each character has its own long term goal • When a character reaches its goal, a new goal is chosen • Wandering behavior • Attraction points do a random walk on the underlying graph
Collision-avoidance model • Particle-based approaches • E.g. Helbing model • When characters get close to each other they push each other away • Force depends on the distance between their personal spaces and whether they can see each other • Disadvantages • Reaction is late • Also reaction when no collision • Artifacts Goal force Avoidance force Resulting force
Improved collision-avoidance model • Collision-prediction approach • When characters are on collision course we compute the positions at impact (of personal spaces) • Direction depends on their relative position at impact • Force depends on the distance to impact • Care must be taken when combining forces Goal force Avoidance force Resulting force
Improved collision-avoidance model • Advantages • Characters react earlier (like in real life) • Characters choose routes that deviate only marginally from original route (energy efficient) • Emergent behavior, e.g. lane formation and characters forming groups • Fast (thousands of characters in real time) Helbing Collision prediction
Some previous work • Also allow speed changes • Deal with small groups
Further work • Get different types of high-level crowd behavior • Social behavior • Collective behavior • Incorporating semantics • … • Combine different types of moving entities • People • Bikes • Cars • Animals • Combination of path planning and animation in 3D