+ All Categories
Home > Documents > Motion Planning for Character Animation and Computer Games Luv Kohli COMP290-058 October 13, 2003.

Motion Planning for Character Animation and Computer Games Luv Kohli COMP290-058 October 13, 2003.

Date post: 22-Dec-2015
Category:
View: 219 times
Download: 0 times
Share this document with a friend
Popular Tags:
51
Motion Planning for Motion Planning for Character Animation Character Animation and Computer Games and Computer Games Luv Kohli Luv Kohli COMP290-058 COMP290-058 October 13, 2003 October 13, 2003
Transcript

Motion Planning for Motion Planning for Character Animation and Character Animation and

Computer GamesComputer Games

Luv KohliLuv Kohli

COMP290-058COMP290-058

October 13, 2003October 13, 2003

OutlineOutline

• Planning Motions with IntentionsPlanning Motions with Intentions• Dynamic Autonomous Agents: Game Dynamic Autonomous Agents: Game

ApplicationsApplications• Better Group Behaviors in Complex Better Group Behaviors in Complex

Environments using Global RoadmapsEnvironments using Global Roadmaps

““Planning Motions with Planning Motions with Intentions”Intentions”

Y. Koga, K. Kondo, J. Kuffner, Jean-Claude Y. Koga, K. Kondo, J. Kuffner, Jean-Claude LatombeLatombe

Motion with Intention?Motion with Intention?

• A motion driven by the A motion driven by the intentintent to to accomplish some taskaccomplish some task– Non-predictableNon-predictable– Not described by laws of physicsNot described by laws of physics

Task-based AnimationTask-based Animation

• Animation of figures automatically Animation of figures automatically computed by motion plannercomputed by motion planner

• Animator concentrates on creating Animator concentrates on creating imaginative graphics instead of moving imaginative graphics instead of moving figures realisticallyfigures realistically

Manipulation PlanningManipulation Planning

• Subset of task-based animationSubset of task-based animation• Automatic generation of human/robot Automatic generation of human/robot

arm motions to complete manipulation arm motions to complete manipulation taskstasks

• Contrast with passive system (e.g. ball Contrast with passive system (e.g. ball falling) – arms move with the falling) – arms move with the intentionintention of completing some taskof completing some task

ProblemProblem

• Find a collision-free path for arms to Find a collision-free path for arms to grasp and then carry a moveable object grasp and then carry a moveable object from an initial location to a goal locationfrom an initial location to a goal location

• Known as Known as multi-arm manipulation multi-arm manipulation planning problemplanning problem

• Must account for the ability of arms to Must account for the ability of arms to change grasp (ungrasp/regrasp) of the change grasp (ungrasp/regrasp) of the objectobject

PlannerPlanner

• Input:Input:– Geometry of the environmentGeometry of the environment– Initial and goal configurations of the Initial and goal configurations of the

moveable object and armsmoveable object and arms– Set of potential grasps of the Set of potential grasps of the

moveable objectmoveable object– Inverse kinematics of the armsInverse kinematics of the arms

Some definitions (1)Some definitions (1)

• Stable space (Stable space (CCstablestable) – set of all legal ) – set of all legal configurations in configurations in CCfreefree where the object where the object is statically stableis statically stable

• Grasp space (Grasp space (CCgraspgrasp) – set of all legal ) – set of all legal configurations in configurations in CCfreefree where one or where one or several arms rigidly grasp the object several arms rigidly grasp the object such that they have sufficient torque to such that they have sufficient torque to move it. move it. CCgraspgrasp CCstablestable

Some definitions (2)Some definitions (2)

• 2 basic types of paths2 basic types of paths– Transit path – defines arm motions Transit path – defines arm motions

that do not move the objectthat do not move the object– Transfer path – defines arm motions Transfer path – defines arm motions

that move the objectthat move the object• Manipulation path - alternate sequence Manipulation path - alternate sequence

of transit and transfer paths that gets of transit and transfer paths that gets from the initial position to the goalfrom the initial position to the goal

Composite configuration Composite configuration spacespace

Planning approach (1)Planning approach (1)

• Each path is a subtask of the total taskEach path is a subtask of the total task• Two-stage approach:Two-stage approach:

– Generate series of subtasks to Generate series of subtasks to achieve goalachieve goal

– Plan transit or transfer paths for each Plan transit or transfer paths for each subtasksubtask

• Example: grab object, carry it to an Example: grab object, carry it to an intermediate location, change grasp, intermediate location, change grasp, carry object to goal location, ungraspcarry object to goal location, ungrasp

Planning approach (2)Planning approach (2)

• Planning a series of subtasks and Planning a series of subtasks and converting them into legal paths is converting them into legal paths is difficultdifficult

• Compromise: plan a sequence of Compromise: plan a sequence of transfer tasks that are guaranteed to be transfer tasks that are guaranteed to be completed into transfer pathscompleted into transfer paths

• Transit tasks are immediately definedTransit tasks are immediately defined• Assumes legal transit path exists for Assumes legal transit path exists for

each transit taskeach transit task

Grasp restrictionsGrasp restrictions

• To simplify the selection of transfer To simplify the selection of transfer tasks, a finite tasks, a finite grasp setgrasp set is predefined is predefined

• Each grasp describes a rigid attachment Each grasp describes a rigid attachment of the end-effector(s) of one or several of the end-effector(s) of one or several arms with the objectarms with the object

Generating transfer tasks (1)Generating transfer tasks (1)

• A path A path TTobjobj that moves the object from that moves the object from its initial to its goal configuration is its initial to its goal configuration is createdcreated

• The planner attempts to use the same The planner attempts to use the same grasp or set of grasps for as long as grasp or set of grasps for as long as possiblepossible

• TTobjobj is computed using RPP (Randomized is computed using RPP (Randomized Path Planner)Path Planner)

Generating transfer tasks (2)Generating transfer tasks (2)

• RPP generates RPP generates TTobjobj as list of adjacent as list of adjacent configurations in a fine grid placed over configurations in a fine grid placed over CCobjobj

• Original RPP only checks that each Original RPP only checks that each inserted configuration is collision-freeinserted configuration is collision-free

• Use a modified RPP – verifies that the Use a modified RPP – verifies that the object can be grasped using a grasp object can be grasped using a grasp from the grasp setfrom the grasp set

Generating transfer tasks (3)Generating transfer tasks (3)

• grasp assignmentgrasp assignment - associates an - associates an element of the grasp set and the element of the grasp set and the identity of the grasping arm(s)identity of the grasping arm(s)

• The planner enumerates all grasp The planner enumerates all grasp assignments at the initial configurationassignments at the initial configuration– Keeps a list of valid grasp Keeps a list of valid grasp

assignments (no collisions)assignments (no collisions)– This list is associated with initial This list is associated with initial

configurationconfiguration

Generating transfer tasks (4)Generating transfer tasks (4)

• Before inserting a new configuration, Before inserting a new configuration, prune the list of grasp assignments prune the list of grasp assignments which are now invalidwhich are now invalid

• If the list is empty, reset it to contain all If the list is empty, reset it to contain all possible grasp assignments (as in the possible grasp assignments (as in the initial configuration)initial configuration)

Generating transfer tasks (5)Generating transfer tasks (5)

• The same grasp using different arm The same grasp using different arm postures is considered a separate grasp postures is considered a separate grasp assignmentassignment

• Each arm has a non-obstructive Each arm has a non-obstructive configurationconfiguration

• The object must be held at all times The object must be held at all times during regraspsduring regrasps

Generating transit paths (1)Generating transit paths (1)

Generating transit paths (2)Generating transit paths (2)

• Difficulty arises when an Difficulty arises when an ungrasp/regrasp is required between ungrasp/regrasp is required between two transfer taskstwo transfer tasks

• In some cases, an intermediate grasp In some cases, an intermediate grasp may be requiredmay be required– Break the transit task into smaller Break the transit task into smaller

transit subtasks such that no two transit subtasks such that no two arms have the same grasp at the arms have the same grasp at the same timesame time

Human-Arm KinematicsHuman-Arm Kinematics

• Model based on two results from Model based on two results from neurophysiologyneurophysiology– Arm and wrist posture mostly Arm and wrist posture mostly

independent of each other: problem independent of each other: problem can be decoupledcan be decoupled

– Arm posture for pointing determined Arm posture for pointing determined by simple sensorimotor by simple sensorimotor transformation model: used to transformation model: used to determine shoulder and elbow joint determine shoulder and elbow joint anglesangles

Arm postureArm posture

• Arm described by four Arm described by four parameters:parameters: , , , , , , - elevation - elevation

and yaw of upper arm and yaw of upper arm and forearm and forearm respectivelyrespectively

• Wrist position (or hand Wrist position (or hand frame) expressed in frame) expressed in spherical coordinates:spherical coordinates:– Azimuth Azimuth , elevation , elevation

, radial distance , radial distance RR

Transformation model (1)Transformation model (1)

• The sensorimotor transformation model The sensorimotor transformation model suggests that the parameters for arm suggests that the parameters for arm posture are approximated by a linear posture are approximated by a linear mapping from the hand frame mapping from the hand frame coordinates:coordinates:

= -4.0 + 1.10= -4.0 + 1.10RR + 0.90 + 0.90 = 39.4 + 0.54= 39.4 + 0.54RR – 1.06 – 1.06 = 13.2 + 0.86= 13.2 + 0.86 + 0.11 + 0.11 = -10.0 + 1.08= -10.0 + 1.08 – 0.35 – 0.35

Transformation model (2)Transformation model (2)

• If the resulting values are legal, then If the resulting values are legal, then determine the wrist joint anglesdetermine the wrist joint angles

• Otherwise enter a tuning phase to Otherwise enter a tuning phase to adjust the values until they are legaladjust the values until they are legal

Transformation model (3)Transformation model (3)

• Wrist joint angles found using standard Wrist joint angles found using standard IK techniques. If values are not legal, IK techniques. If values are not legal, then closest are chosen and improved then closest are chosen and improved in final adjustment stepin final adjustment step

• Final adjustment step: constrained Final adjustment step: constrained optimizationoptimization

Natural motionNatural motion

• Results compared to neurophysiological Results compared to neurophysiological naturalness constraints – fit fairly wellnaturalness constraints – fit fairly well

• Dynamics not considered – this is OK Dynamics not considered – this is OK according to neurophysiologyaccording to neurophysiology

• Modulation in elevation and yaw in Modulation in elevation and yaw in upper arm and forearm close to upper arm and forearm close to sinusoidal, and technique’s sinusoidal, and technique’s experimental values match wellexperimental values match well

ResultsResults

• Each human arm has 7 DOF, +19 for Each human arm has 7 DOF, +19 for each handeach hand

• Robot has 6 revolute joints and 3 DOF Robot has 6 revolute joints and 3 DOF for end-effectorfor end-effector

• Grasp set contained 289 grasps, and Grasp set contained 289 grasps, and grasp assignment lists of up to 2600 grasp assignment lists of up to 2600 elementselements

• (show video)(show video)

““Dynamic Autonomous Dynamic Autonomous Agents: Game Applications”Agents: Game Applications”

S. Goldenstein, E. Large, D. MetaxasS. Goldenstein, E. Large, D. Metaxas

The problemThe problem

• Want to model autonomous agents in Want to model autonomous agents in game-like environmentsgame-like environments– Real-timeReal-time– Dynamic targets and obstacles in the Dynamic targets and obstacles in the

environmentenvironment

Why?Why?

• Useful for:Useful for:– SimulationsSimulations– GamesGames– VRVR

• Want agents to exhibit certain Want agents to exhibit certain behaviors without user interventionbehaviors without user intervention

How?How?

• Make use of dynamical systems theoryMake use of dynamical systems theory– Express intelligent behaviors using Express intelligent behaviors using

systems of differential equationssystems of differential equations• Two distinct dynamic systems are Two distinct dynamic systems are

combined:combined:– Movement dynamics – controls agent Movement dynamics – controls agent

movement (heading, velocity)movement (heading, velocity)– Task dynamics – controls agent Task dynamics – controls agent

behaviorbehavior

Heading direction (1)Heading direction (1)

• Movement defined by 2D vector Movement defined by 2D vector representing agent’s heading angle and representing agent’s heading angle and forward speedforward speed

• Heading angle computed via:Heading angle computed via:

• ff is a nonlinear function and is a nonlinear function and envenv represents the state of the environmentrepresents the state of the environment

Heading direction (2)Heading direction (2)

• Each element of the environment can attract Each element of the environment can attract or repel an agentor repel an agent

• Attractors and repellers are located at the zero Attractors and repellers are located at the zero crossings of crossings of ff (critical/fixed points) (critical/fixed points)

• Attractor (target) modeled as:Attractor (target) modeled as:

is angle of target’s location relative to is angle of target’s location relative to agent’s location, and agent’s location, and aa is constant parameter is constant parameter (generally set as 1)(generally set as 1)

Heading direction (3)Heading direction (3)

• Obstacles (e.g. enemies or hazards) are Obstacles (e.g. enemies or hazards) are distinct entitiesdistinct entities

• ““Fire-pits, for example, are clearly more Fire-pits, for example, are clearly more dangerous than a large wall.”dangerous than a large wall.”

Heading direction (4)Heading direction (4)

• Different repellers created using Different repellers created using multiplication of three functionsmultiplication of three functions

RRii – type of repeller – type of repeller

WWii – angle-based influence – angle-based influence

DDii – distance-based influence – distance-based influence

• Repeller (obstacle) modeled as:Repeller (obstacle) modeled as:

• Resulting influence from obstacles:Resulting influence from obstacles:

Heading direction (5)Heading direction (5)

• Heading angle obtained using:Heading angle obtained using:

• wwtartar and and wwobsobs are weights obtained are weights obtained through the task dynamics systemthrough the task dynamics system

• The noise term The noise term nn allows the system to allows the system to escape from unstable fixed pointsescape from unstable fixed points

Heading direction (6)Heading direction (6)

Example 1Example 1

Example 2Example 2

• Simplest possibility: constant velocity, but Simplest possibility: constant velocity, but potential for many collisionspotential for many collisions

• Instead, have agent move faster when no Instead, have agent move faster when no objects are near and slower in a crowded area:objects are near and slower in a crowded area:

• rrminmin = distance to closest obstacle, = distance to closest obstacle,dd11 = safety distance, = safety distance, t2ct2c = time to contact = time to contact

VelocityVelocity

Task dynamics (1)Task dynamics (1)

• Individually, Individually, attractors and attractors and repellers work well, repellers work well, but their sum might but their sum might yield problemsyield problems

• Instead of a direct Instead of a direct sum, use weights sum, use weights determined by a determined by a second dynamical second dynamical system that runs at a system that runs at a more refined time more refined time scalescale

Task dynamics (2)Task dynamics (2)

• The second system is modeled as:The second system is modeled as:

11, , 22, , 1212, and , and 2121 are parameter are parameter functions to be designedfunctions to be designed

• wwtartar and and wwobsobs are computed based on the are computed based on the computation of the fixed points in this computation of the fixed points in this system (.system (.wwtartar = . = .wwobsobs = 0) = 0)

Stability analysis (1)Stability analysis (1)

• This system when chosen arbitrarily This system when chosen arbitrarily may not converge to a fixed point, so a may not converge to a fixed point, so a stability analysis is requiredstability analysis is required

• This is done using a classical nonlinear This is done using a classical nonlinear dynamical system stability analysisdynamical system stability analysis

• It is determined that the system has It is determined that the system has four critical points: (0,0), (0,four critical points: (0,0), (0,1), (1), (1,0), 1,0), ((AA11, , AA22), where), where

Stability analysis (2)Stability analysis (2)

Stability analysis (3)Stability analysis (3)

• Based on this information the Based on this information the parameter functions can be computed parameter functions can be computed (see paper)(see paper)

““Better Group Behaviors in Better Group Behaviors in Complex Environments using Complex Environments using

Global Roadmaps”Global Roadmaps”O. Burchan Bayazit, Jyh-Ming Lien, Nancy AmatoO. Burchan Bayazit, Jyh-Ming Lien, Nancy Amato

ReferencesReferences

• Y. Koga, K. Kondo, J. Kuffner, J.L. Latombe, Y. Koga, K. Kondo, J. Kuffner, J.L. Latombe, Planning Motions with IntentionsPlanning Motions with Intentions. Proceedings . Proceedings of SIGGRAPH 94, ACM SIGGRAPH, 1994, 395-of SIGGRAPH 94, ACM SIGGRAPH, 1994, 395-408.408.

• Goldenstein, S., Large, E., and Metaxas, D. Goldenstein, S., Large, E., and Metaxas, D. Dynamic Autonomous Agents: Game Dynamic Autonomous Agents: Game ApplicationsApplications. Computer Animation, 1998.. Computer Animation, 1998.

• O. Burchan Bayazit, Jyh-Ming Lien, Nancy M. O. Burchan Bayazit, Jyh-Ming Lien, Nancy M. Amato, Amato, Better Group Behaviors using Global Better Group Behaviors using Global RoadmapsRoadmaps. Proceedings of the 8. Proceedings of the 8thth International International Conference on the Simulation and Synthesis of Conference on the Simulation and Synthesis of Living Systems (Alife’02), December 2002, pp. Living Systems (Alife’02), December 2002, pp. 362-370.362-370.


Recommended