Path Following & Motion Control

advertisement
Path Following & Motion
Control
Stephen J. Guy
One Theme – Two paper
► Pedestrian
path following
 Control using physics
► Controlling
Physical Simulations
 Control of physics
Reactive Pedestrian
Dynamics
Reactive Pedestrian Dynamics
►
Premise:
 Building visualizations are more compelling
with moving people
 Need a simple to place moving virtual people
in models
►
Approach:
1. Let users specify path
2. Make agents follow it naturally
Reactive Pedestrian Path Following from
Examples, Ronal Metoyer Oregon State, Jessica
Hodgins CMU (2004)
Agent Model
► Create
“Intelligent” Agents to follow path
► Intelligence comes from force models in the
environment and on other agents
► Example forces:
User Defined Paths
► Exploits
humans’ natural ability to general
realistic paths
► Convert paths into forces:





f(s) – Unit vector along path (at nearest point)
f(dmax) – unit vector perpendicular to f(s)
p – the perpendicular distance to the path
d – max is the largest allowed distance
kp – the path gain
Path Following Diag.
►
Example application of forces
 Note the direction of force changes with distance from path
Hazard’s of Potential Based Models
► The
authors state:
“The intelligence model alone should produce correct 2D motion in
terms of avoiding the defined obstacles and reaching goals, but will not
necessarily produce natural motion for navigating complex scenes.”
► Reading
between the lines:
 Our approach (like any potential based method) can
mess up when two dynamic agents are involved
► Solution
– Let the user fix it
 User warned of collisions and asked how to handle:
► Yield
► Cut
in front
► Go-around-right (or left)
► No action
Implementing Avoidance Primitives
► Cut-In
Front and Yield:
 Change the agent’s
speed to avoid collision
► Go
Around Right:
 Change the agent’s
direction to avoid
collision
Automating Avoidance Primitive
► Somehow
we’ve moved away from our goal
of an automatic system for path following
► Key Idea - Learn from previous user
corrections (Machine Learning/AI)
► Record data needed to repeat user
decisions:
 Layout of scene
 Position of agents
 Speed of agents
Training
►
►
Build a naïve Bayes classifier
Inputs:







►
Is the path around left blocked (Y or N)
Is the path around right blocked (Y or N)
Relative speed of the colliding pedestrians (5)
Approach direction of the colliding pedestrians (8)
Colliding pedestrian’s distance to collision (5)
Pedestrian’s distance to collision (5)
Desired travel direction (3)
Outputs:




Yield
Cut in front
Go-around-right (or left)
No action
►
►
►
►
►
aj – jth action
hi – ith avoidance technique
H – set of all avoidance techniques
nhi – number of times user selected hi
|N| – total number of user selections
Results
► No
videos (dead links )
► Simulation snapshot -->
► Bayes Classification
Sampling Plausible Solutions
to Multi-body Constraint
Problems
Solution Sampling for Constraint
Satisfaction
► Premise
 Extreme sensitivity makes multi-body simulations difficult
to control
 Users general want a goal, more than the care how the
goal is achieved
► Approach
 Allow users to specify constraints (goals)
 Explore simulation space
 Return animations which likely satisfied constrains
Chenney, S., and Forsyth, D. A. 2000. Sampling plausible
solutions to multi-body constraint problems. In Proceedings of
ACM SIGGRAPH 2000, 219–228.
Simulation Randomness
► Simulation
needs randomness for this
technique to work
 Needs variations in simulations to explore
► Authors
argue randomness is good anyway
 Models small variations in otherwise flat surfaces
 Closer to real world
 Closer to user expectation
Incorporating Uncertainty
► Define
function pw(A) (prob. of animation A)
which is low for unlikely As and high for
likely As
► Consider a bouncing ball (2D)
► A is collection of normals i
► Vertical normals likely:
Constraints Satisfaction
► We
want pw(A | C) ‘s distribution in A
 Return animations with high likely in pw
► Example
Constraints
 Ball must go from here to there
 Ball much have final velocity of foo
 Ball must bounce through hoop
► Finding
pw(A|C) is not (generally) possible
Constrain Approximation
► Can’t
use pw(A|C)
► Instead use p(A) = pw(A)*pc(A)
 pc(A) depends on how well A satisfies constraints
► For
ball example
(d is target distance form center)
► And
► Sample
according to p(a)
 Mainly likely events
 Occasionally unlikely events
Defining Plausibility
► Moves
past “it it looks right to me its right”
► Plausibility is statistically defined be P(A)
► Possible to validate important parts of P(A)
against a real world model
► But there are other approaches
 (See next paper)
Markov Chain Monte Carlo (MCMC)
► Markov
Chain Model
 Given a sequence of events, next state is
dependant only on current state
► Monte
Carlo Algorithms
 Using random numbers to help (probably) solve
problems
► MCMC
 Generate sequence of animations: A1, A2, A3, …
 An dependant only on An-1
 A is distributed following p(A)
Algorithm
initialize(A0)
2.
simulate(A0)
3.
Repeat
4.
propose(Ac, Ai)
5.
simulate(Ac)
6.
u <- random(0,1)
7.
if u < min(1,
8.
Ai+1 <- Ac
9.
else
10.
Ai+1 <- Ai
1.
)
q(X | Y) is probability of
transitioning from X to Y
Example – 2D Ball
►
Generating Ai+1:
 50% of adding between -5
and 5 degrees to each
normal of the previous
animation
►
►
q(X|Y):
Choosing d is tricky
 Too small – no variation
 Too large – constraints
aren’t well satisfied
Example - Bowling
► Rank
resulting pin-condition with Gibbs distribution
 pc(A) = k+m
►
>1
► k number of correct pins
► m number of undisturbed pins
►  has the same constraints as d did before
 Author’s claim less sensitivity
► Proposing
new Ai
 Sample new values for all variables
 Change the radius, density, or initial conditions of the
ball
 Change the initial position of some pins
Bowling – Videos (1/2)
►3
Different strike
animations
 Was easy to get strikes
given simulations
Bowling – Videos (2/2)
Bowling 7-10 split
Example – Spelling Balls
► Similar
to bowling
 Gibbs distribution
 Similar Parameters varied
► Spelling
“Hi”
 “A few hours” on an Pentium
200 MHz
Example - Dice
► Approach
from simple ball example won’t work
 Need a smooth change in normals
► Create
“surface” using b-splines
► Vary control points of b-spline
► ~ 1 hour per die
Future Work
► Issues
►
 Not real time
 Not interactive (is this an issue?)
 Very slow
 Unclear how to best build p(A|C) (std. dev issues)
 Unclear how to best build the proposal function
“Multi-body constraint problems are good candidates for a
Design Galleries interface, in which a user browses through
sample solutions to locate the one they prefer. Our work
addresses the sampling aspect …, but we do not consider
other aspects of the interface.”
Many-Worlds Browsing for
Control of Dynamics
Simulations
Many-Worlds Browsing for Control
Premise
►



Passive physical simulations are great…
But artists often need more control
Existing techniques are basically
1.
2.

Convert user’s goals to a function
Minimize this function numerically
This is slow on non-linear simulations
Approach
►


Leverage human flexibility
Provide user options at interesting points
Christopher D. Twigg and Doug L. James. Many-worlds browsing for
control of multibody dynamics. ACM Transactions on Graphics
(SIGGRAPH 2007), 26(3), August 2007.
Keeping the User in the Loop
► Previous
work used offline Markov Chain
Monte Carlo to reach goals (Chenney and
Forsyth)
► Authors argue it’s good to keep the user in
the loop
 Gives feedback on the simulation
 Even w/ ideal optimizations, user would need to
give feedback on simulation setup
Basic Technique
1.
2.
3.
4.
5.
6.
►
Specify initial simulation state
Create various physical simulations, until a
collision
Report various results/options to user
Allow user to choose path
Allow user to insert new objects
Repeat
It’s important to return a variety of results, but
they all need to be plausible
Plausibility
► Studies
have been performed on how much users
notice wrong results [O’Sullivan]
► Variations users don’t mind/notice are considered
plausible
► Users were unable to detect distortions of up to:
 40% in magnitude of linear velocity
 20 degrees in direction of linear velocity
 20% in angular velocity
► Assumes
that chains of
plausible actions
are also plausible
Practicalities
► Parallelization
 Running multiple simulations is slow
 Each simulation is independent
 Split over a cluster!
► Data
transfer
 Simulation from each comp. needs to be sent to
user
 Need efficient representation (or lots of bandwidth)
►Represent
the position as a piecewise quadratic spline
►Represent the rotation as a piecewise linear skewsymmetric matrix
User Interaction
► Spatial
queries
 Allow the user to section areas where the chosen
objects should or should not go through
► Ranking
metrics – allows the user to specity
additional metrics to sort valid queries by
 Angular velocity, running time, collisions, orientation,
desired constraints
► Refinement
– allow user updates in realtime
Results
► UI
was vary fast, able to show user over
1,500 simulation results at once screen
► Creating




interesting simulations was quick
Refrigerator Toy – 5½ minutes
Spelling SIGGRAPH – 1 hour (w/ backtracking)
Spiral Staircase – 25 minutes
Trebuchet – Simulation took 14 hours so no
realtime refinement was possible
Result
►SIGGRAPH
►Live
Demo
Video
Comparison
► The
three control techniques were radically
different
► The first – worked to follow users path (with a
physically inspired model)
► The second – gave user several options which fit
their constraints
► The third – allowed the user to naturally explore
physically based options
► Some similarities
 Leverage user input when it makes sense
 Physics! (making life better)
Questions
References
Ronald Metoyer, and Jessica Hodgins, Reactive Pedestrian Path Following
from Examples, (2004).
Christopher D. Twigg and Doug L. James. Many-worlds browsing for
control of multibody dynamics. ACM Transactions on Graphics
(SIGGRAPH 2007), 26(3), August 2007.
Chenney, S., and Forsyth, D. A. 2000. Sampling plausible solutions to
multi-body constraint problems. In Proceedings of ACM SIGGRAPH
2000, 219–228.
O’Sullivan, C., Dingliana, J., Giang, T., And Kaiser, M. K. 2003. Evaluating
the visual fidelity of physically based animations. ACM Transactions on
Graphics 22, 3 (July), 527–536.
Download