8.3 Scalability
9.1.2 The Animation Control Problem
An ideal held by many researchers is a system where a character (model) can be given a fairly general instruction (e.g. “walk across the room” or “catch this ball”) and a controller will be automatically selected or generated that can achieve the desired result when fed into the model in a physics simulator. Creat- ing these controllers remains extremely difficult. Controllers have been automat- ically generated for simple models in two and three dimensions by a variety of methods including constrained optimisation [130], genetic algorithms [80, 34, 7], sensor-actuator networks [119, 121], genetic programming [39, 40], and neural networks [107]. Success for models as complex as a very stylised humanoid has required manual intervention such as careful sensor selection [107], a hand- specified state sequence [62] or a supporting “hand of God” [122]. Controllers for somewhat more realistic human models have been hand-created with signif- icant effort, and require careful analysis of specific motions [45, 44, 27, 26, 138]. A wide variety of solutions have been attempted for this problem and our review here is by no means complete. In particular, a great deal of research has focused on finding appropriate controller representations and optimisation techniques.
9.2. OUTLINE
Each of the automatic controller generators is at its heart an optimisation process minimising a motion-judging evaluation metric over a multidimensional space of possible controllers. This optimisation is made difficult by high di- mensionality, lack of gradient information and a high cost of evaluating the motion—each trial requires calling the physics simulator, which runs at best only a small factor faster than realtime.
This research addresses the evaluation cost and gradient problems by in- troducing an approximating cache layer between the optimiser and the physics simulator. The approximation can represent huge time steps compared to the tiny steps physical simulation often requires for stability, and can be continuous and differentiable.
9.2
Outline
In Chapter 10 we review the types of physical simulation used in motion syn- thesis, including several types of actuator and their desirable and undesirable features.
In Chapter 11 we set up a Radial Basis Function scheme for approximating simulation results, solve some computational issues, and discuss the limitations of this approach.
Chapter 10
Simulation
10.1
Physics Modelling
We are interested in simulating models constructed of rigid segments connected by hinge joints. For this particular project, we are not interested in colli- sions, friction, or articulated models containing loops. The open source library ODE [106] (Open Dynamics Engine), based originally on software written by Russell Smith as part of his PhD research on motion synthesis [107], fits these needs well, and more besides.
In ODE, rigid bodies are given an inertia tensor to specify mass distribu- tion and a shape for visualisation and collision detection; we restrict ourselves to (uniform density) cylinders for both. Rigid bodies are connected to each other and their world by joints such as hinges, ball joints and sliders; we use only hinges. The simulation consists of numerical integration of the equations of motion, and uses a semi-implicit first order integration scheme which is very stable but has low accuracy for long simulations or large integration step sizes. It is perfectly adequate for our purposes, however, as the entire process is de- terministic and we will be simulating only short sections of motion from precise start points. We can essentially choose the integration steps to be as small as we need, since our primary objective is to avoid using the simulator whenever possible.
ODE represents the status of each body in “maximal” coordinates, that is, world-relative coordinates which can represent arbitrary translations and rotations, and as a consequence joint constraints are not hard. Errors can creep in, causing joint constraints to be violated, and ODE has an error reduction mechanism which applies forces to correct constraint violations. The errors, like the integration errors, do not concern us, and ODE’s error reduction has proven satisfactory (we use an Error Reduction Parameter of 0.8). For our
only represent configurations which satisfy the joint constraints—a space of much lower dimension.
At each integration step, ODE accumulates the forces acting on each rigid body, and arbitrary forces and torques can be added in at this point, allowing us to plug in any actuation system we choose. We take this approach rather than make use of the built in motors as they are based on achieving a velocity around a joint, and we would like more freedom to experiment. We make use of ODE’s built in gravity.
ODE provides joint limits, so that a hinge’s range of motion can be re- stricted, but these act like solid blocks, causing bounces involving instantaneous changes in velocity. While in some applications this may be more realistic, in this project there are two reasons for it to be undesirable. Firstly, we are in- tending to approximate this entire system with a continuous approximation, so any discontinuities will cause trouble. Secondly, we are primarily interested in mimicking people and animals, and biological joints have cushioning and sur- rounding tissue which prevent such joint bounces as occur from being perfectly rigid. We make no attempt at biological realism here, but replace ODE’s hard joint limits with cubic springs to ensure continuity of velocity on the time scales we are dealing with.