Reactive Pedestrian Path Following from Examples Computer Animation and Social Agents 2003 Ronald A. Metoyer Jessica K. Hodgins Computer Animation and Social Agents 2003 Ronald A. Metoyer Jessica K. Hodgins
Introduction Need a system to model the movement of many people walking and interacting Want to maintain control over the path each individual takes Hard to deal with collision avoidance with many characters Easy to use Need a system to model the movement of many people walking and interacting Want to maintain control over the path each individual takes Hard to deal with collision avoidance with many characters Easy to use
Previous Work Reynolds Boid Model for flocks, schools, and herdsBoid Model for flocks, schools, and herds Pedestrian Models Fluid flow modelFluid flow model Inter-pedestrian interaction models (Helbing and Molnar)Inter-pedestrian interaction models (Helbing and Molnar) –Social interaction based on + and – potential fields –Lane formation in halls, queuing, turn taking Reynolds Boid Model for flocks, schools, and herdsBoid Model for flocks, schools, and herds Pedestrian Models Fluid flow modelFluid flow model Inter-pedestrian interaction models (Helbing and Molnar)Inter-pedestrian interaction models (Helbing and Molnar) –Social interaction based on + and – potential fields –Lane formation in halls, queuing, turn taking
2D Character Intelligence Exploit fact that humans have to move on a 2D plane (for the most part) Basic level of intelligence Reactive path following, obstacles, other pedestriansReactive path following, obstacles, other pedestrians Social Forces Model Reactive control utilizes potential fieldsReactive control utilizes potential fields Obstacles are repulsiveObstacles are repulsive Goals are attractiveGoals are attractive Exploit fact that humans have to move on a 2D plane (for the most part) Basic level of intelligence Reactive path following, obstacles, other pedestriansReactive path following, obstacles, other pedestrians Social Forces Model Reactive control utilizes potential fieldsReactive control utilizes potential fields Obstacles are repulsiveObstacles are repulsive Goals are attractiveGoals are attractive
Potential Fields
Modeling Point mass dynamics Update equation is:Update equation is: Where the force f x is obtained from the potential fieldWhere the force f x is obtained from the potential field dt is the simulation stepsdt is the simulation steps m is the mass of the characterm is the mass of the character Although goal locations can be specified, it is desirable to allow a definable path for the character to follow People are experts in drawing a path through a scene in the absence of moving obstaclesPeople are experts in drawing a path through a scene in the absence of moving obstacles Can also be generated through automatic processCan also be generated through automatic process Point mass dynamics Update equation is:Update equation is: Where the force f x is obtained from the potential fieldWhere the force f x is obtained from the potential field dt is the simulation stepsdt is the simulation steps m is the mass of the characterm is the mass of the character Although goal locations can be specified, it is desirable to allow a definable path for the character to follow People are experts in drawing a path through a scene in the absence of moving obstaclesPeople are experts in drawing a path through a scene in the absence of moving obstacles Can also be generated through automatic processCan also be generated through automatic process
Path Diagram User draws a spline path for character to follow The path is converted into forces by the following: Character will attempt to follow the direction of the path, but as it gets more off track, it’ll be pulled back stronger
Direction Primitives Intelligence model will produce correct 2D animation in terms of obstacle avoidance, but not necessarily natural looking Alert user to potential collisions and ask how to resolve them Navigation Primitives Yield, Cut-in-front, Go-around-right, Go-around-left, No-actionYield, Cut-in-front, Go-around-right, Go-around-left, No-action Chosen based on traffic planning researchChosen based on traffic planning research Intelligence model will produce correct 2D animation in terms of obstacle avoidance, but not necessarily natural looking Alert user to potential collisions and ask how to resolve them Navigation Primitives Yield, Cut-in-front, Go-around-right, Go-around-left, No-actionYield, Cut-in-front, Go-around-right, Go-around-left, No-action Chosen based on traffic planning researchChosen based on traffic planning research
Direction Primitives (Cont.) Focus on two tasks a pedestrian performs MonitoringMonitoring –Observing other pedestrians in the area to determine their navigational intents YieldingYielding –Act of adjusting velocity (Magnitude or Direction) to avoid a potential collision Focus on two tasks a pedestrian performs MonitoringMonitoring –Observing other pedestrians in the area to determine their navigational intents YieldingYielding –Act of adjusting velocity (Magnitude or Direction) to avoid a potential collision
Learning Use previous direction primitive choices to aid the user in future decisions Direction PrimitiveDirection Primitive Feature vector that describes current sceneFeature vector that describes current scene –Is the path around left blocked by other pedestrians or obstacles (Y or N) –Is the path around right blocked by other pedestrians or obstacles (Y or N) –Relative speed of the colliding pedestrian (5) –Approach direction of the colliding pedestrian (8) –Colliding pedestrian’s distance to collision (5) –Pedestrian’s distance to collision (5) –Desired travel direction (3) Use previous direction primitive choices to aid the user in future decisions Direction PrimitiveDirection Primitive Feature vector that describes current sceneFeature vector that describes current scene –Is the path around left blocked by other pedestrians or obstacles (Y or N) –Is the path around right blocked by other pedestrians or obstacles (Y or N) –Relative speed of the colliding pedestrian (5) –Approach direction of the colliding pedestrian (8) –Colliding pedestrian’s distance to collision (5) –Pedestrian’s distance to collision (5) –Desired travel direction (3)
Learning (Cont.) Naïve Bayes Classifier Five primitives are hypothesesFive primitives are hypotheses Seven variables are inputsSeven variables are inputs Potential collisions are classified into one of the 5 primitivesPotential collisions are classified into one of the 5 primitivesAdvantages Outperforms neural networks and machine learning algorithms in most real life casesOutperforms neural networks and machine learning algorithms in most real life casesDisadvantages Limited by the fact that it can only deal with discrete dataLimited by the fact that it can only deal with discrete data Naïve Bayes Classifier Five primitives are hypothesesFive primitives are hypotheses Seven variables are inputsSeven variables are inputs Potential collisions are classified into one of the 5 primitivesPotential collisions are classified into one of the 5 primitivesAdvantages Outperforms neural networks and machine learning algorithms in most real life casesOutperforms neural networks and machine learning algorithms in most real life casesDisadvantages Limited by the fact that it can only deal with discrete dataLimited by the fact that it can only deal with discrete data
3D Motion Generation Use motion capture Create a directed graph of poses to get a probability matrix for transitions from one pose to another Use motion capture Create a directed graph of poses to get a probability matrix for transitions from one pose to another
Results Compared the Naïve Bayes algorithm to actual choices made by users Claim 72% accuracy as opposed to a random choice which would be 20% naturallyClaim 72% accuracy as opposed to a random choice which would be 20% naturally This doesn’t mean much, because all it is really testing is their ability to train a Bayes classifierThis doesn’t mean much, because all it is really testing is their ability to train a Bayes classifier Compared the Naïve Bayes algorithm to actual choices made by users Claim 72% accuracy as opposed to a random choice which would be 20% naturallyClaim 72% accuracy as opposed to a random choice which would be 20% naturally This doesn’t mean much, because all it is really testing is their ability to train a Bayes classifierThis doesn’t mean much, because all it is really testing is their ability to train a Bayes classifier
Limitations Requires (utilizes) a lot of human intervention There is no motion capture data of a person stopped, so it appears the person is spinning around when standing still Requires (utilizes) a lot of human intervention There is no motion capture data of a person stopped, so it appears the person is spinning around when standing still
Videos
Basic System Renderer DynamicsController Integrator U/I State Torques Desired State State Torques
Cart / Pole
Apply torque to cart’s wheels Balance poleBalance pole Accomplish desired locationAccomplish desired location Accomplish desired velocityAccomplish desired velocity Extra Credit Swing-up taskSwing-up task Apply torque to cart’s wheels Balance poleBalance pole Accomplish desired locationAccomplish desired location Accomplish desired velocityAccomplish desired velocity Extra Credit Swing-up taskSwing-up task
Basic input file for Cart / Pole language = C gravity = prefix = cartpole # cart is a truck-sized object, 20 x 4 x 3 feet = 6x1.5x1 meters # with car-like density of 170 kg / m^3 # therefore, truck-like mass of 1800kg = 4000 lbs language = C gravity = prefix = cartpole # cart is a truck-sized object, 20 x 4 x 3 feet = 6x1.5x1 meters # with car-like density of 170 kg / m^3 # therefore, truck-like mass of 1800kg = 4000 lbs
body = cart joint = slider jname = pos mass = 1530 mass = 1530 inertia = inertia = bodyToJoint = bodyToJoint = pin = pin = body = cart joint = slider jname = pos mass = 1530 mass = 1530 inertia = inertia = bodyToJoint = bodyToJoint = pin = pin = 1 0 0
# A 300 lb = 136 kg ladder that is roughly # 15 x 1.5 x 0.5 feet = 4.6x.45x.15 meters body = ladder inboard = cart joint = pin jname = theta mass = mass = inertia = inertia = bodyTojoint = bodyTojoint = inbToJoint = inbToJoint = pin = pin = # A 300 lb = 136 kg ladder that is roughly # 15 x 1.5 x 0.5 feet = 4.6x.45x.15 meters body = ladder inboard = cart joint = pin jname = theta mass = mass = inertia = inertia = bodyTojoint = bodyTojoint = inbToJoint = inbToJoint = pin = pin = 0 1 0
Swinger More complicated simulation of girl on a swing Hands are rigidly attached to ropeHands are rigidly attached to rope Butt is rigidly attached to seatButt is rigidly attached to seat You control torques at shoulder, elbow, hips, and kneeYou control torques at shoulder, elbow, hips, and knee More complicated simulation of girl on a swing Hands are rigidly attached to ropeHands are rigidly attached to rope Butt is rigidly attached to seatButt is rigidly attached to seat You control torques at shoulder, elbow, hips, and kneeYou control torques at shoulder, elbow, hips, and knee
Swinger State machine Swinging has discrete modes, or statesSwinging has discrete modes, or states –Define when they begin and end –Define what movements are required for each state State machine Swinging has discrete modes, or statesSwinging has discrete modes, or states –Define when they begin and end –Define what movements are required for each state
Discrete event simulations Very important!!! Each simulation has a simulation timestep, DTEach simulation has a simulation timestep, DT Smaller timestep required for larger forcesSmaller timestep required for larger forces –Numerical imprecision of integrator Make sure your simulations are precise by dropping DT by an order of magnitude and confirm behavior is the sameMake sure your simulations are precise by dropping DT by an order of magnitude and confirm behavior is the same Very important!!! Each simulation has a simulation timestep, DTEach simulation has a simulation timestep, DT Smaller timestep required for larger forcesSmaller timestep required for larger forces –Numerical imprecision of integrator Make sure your simulations are precise by dropping DT by an order of magnitude and confirm behavior is the sameMake sure your simulations are precise by dropping DT by an order of magnitude and confirm behavior is the same