440 likes | 677 Views
Control of Articulated Bodies. Lecture for COMP 768 presented by Georgi Tsankov Oct 30, 2007. Control of Articulated Bodies. Overview Control system. One-legged hopper and dynamic locomotion. Animating human athletics. Automatically generated controllers.
E N D
Control of Articulated Bodies Lecture for COMP 768 presented by Georgi Tsankov Oct 30, 2007
Control of Articulated Bodies • Overview • Control system. • One-legged hopper and dynamic locomotion. • Animating human athletics. • Automatically generated controllers. • Composable controllers, more intelligent behavior.
Control System • The Control Problem: • Question: how do we control the muscles in order to achieve a desired motion (walking) ? • What motions are we interested in: • grasping - easier (stable, less DOF). • walking/running - cyclic, unstable, many DOF. The most important movement a human can perform. Most of the work is concentrated here.
Disciplines involved and Applications • Robotics • Computer Animation • Feature films • Computer games • Biomechanics • Provides real-world data. • Uses simulations for analysis of problems, high-performance athletics. • Artificial Intelligence
Properties of a good control system • Realistic. • Keeping balance. • Adaptable to different characters (proportions, weights). • Various speeds and gaits. • Changing direction, variable step length. • Handling uneven terrain, obstacles, external forces.
A typical control system: • Finite state machine: • Small number of states (2-10) • Types of transitions: • Timed – after fixed amount of time. • Sensor-based – after certain event has happened.
A typical control system: • Example FSM (running for one-legged robot):
Open vs. Closed-loop control: • Open-loop control doesn’t consider feedback. • The behavior is hard-coded (only timed transitions). • Cheap, simple, sometimes sufficient for computer animation. • Closed-loop control observes its output. • More realistic model, required for robotics and biomechanics. • Can be learned. http://www.motivationwarehouse.com/images/product_images/chatterbox.jpg
Open vs. Closed-loop control: Open-loop Output signal (Force) Input signal New body position Controller Joint Closed-loop Output signal (Force) Input signal New body position Controller Joint Feedback
Proportional-Derivative controller (PD servo) • PD controller - a simple closed-loop controller. • Input: • desired pose (angles) and velocities. • current pose. • Output: • force. • kd – derivative gain • kv – velocity feedback gain • The gains determine the strength of the joint http://www.library.cmu.edu/ctms/ctms/examples/pitch/pidplot3.gif
Control of Articulated Bodies • Overview • Control system. • One-legged hopper and dynamic locomotion. • Animating human athletics. • Automatically generated controllers. • Composable controllers, more intelligent behavior.
First Approach: • [Raibert83], MIT - 3D one-legged hopping robot. • The control system is divided into three independent parts: • Control of the forward speed. • Control of the body attitude. • Control of the hopping height.
One-legged hopper • 4 DOF: • 1 for length of the leg. • 3 for the joint. • Only 2 DOF in 2D. • Modeled as spring and inverted pendulum. • Video
One-legged hopper • Many papers in late 80s, early 90s are based on this control design. Especially separation of the control into 3 components. • We will focus on [Hodgins91].
Animation of Dynamic Legged Locomotion • Based on the one-legged hopper. Present three hopping robots: • One-legged planar kangaroo • Biped • Quadruped
Animation of Dynamic Legged Locomotion • 5 states. • Can be simplified to: • Support phase. • Flight phase. • All the transitions are event-driven.
Animation of Dynamic Legged Locomotion • Controlling forward velocity: we can only influence step length, i.e. the next footstep. • Neutral point – the velocity is preserved. • Step before the neutral point – increased velocity. (after–decreased). • xfh– forward displacement of the foot. • ts – duration of the support period. • q – the angle of the leg at touchdown. • kx’ – gain, determined experimentally.
Animation of Dynamic Legged Locomotion • Controlling body attitude: • Estimate the torque at the hip, given: • Desired angle – fd. • Current angle – f. • Use PD control: • t – hip torque. • kf ,bf – gains.
Animation of Dynamic Legged Locomotion • Controlling hopping height: • Depends on the force exerted by the leg. • The leg is modeled as spring with adjustable rest length (Ld). • Ld– rest length – can be modified to control the hop height. • kL, bL– gains, again experimentally.
From hopper to biped • Active and idle leg changing at each step. • The active leg behaves as before. • Strategies for the idle leg: • In flight – mirror the active leg (for balance) • (Here the active and idle leg are swapped.) • In compression/thrust – keep short (not to penetrate the ground)
Quadruped • The four legs are coordinated in two pairs - two virtual legs. • The controller is essentially the same as for the biped (operating on the virtual legs). • Different grouping for different gaits • diagonal for trotting. • front and rear for bounding. • Video
Animation of Dynamic Legged Locomotion • What we have? • Realistic motions for hopping robots. • How to extend them to virtual humans? [Hodgins95] • Use the same FSM. • The control is again divided into three parts (forward velocity, balance, vertical velocity).
Control of Articulated Bodies • Overview • Control system. • One-legged hopper and dynamic locomotion. • Animating human athletics. • Automatically generated controllers. • Composable controllers, more intelligent behavior.
Animating human athletics • What is new ? • The runner has 17 body segments, 30 DOF. • Legs can still be modeled as springs, the length is controlled by the knee and hip joints. • The hands follow the same pattern as the legs (to reduce the torque of the upper body). • Similar techniques for bicycling and vaulting are presented in the same paper ([Hodgins95]). (video1, video2, video3)
Walking vs. Running Running cycle Left • How is walking different ? • Has double-support phase. • No flight phase. • The legs are not springy (no energy is saved in them). Right Walking cycle Left Right • [Yin,Panne07] present control system for walking and running based on PCG: • Very small number of parameters. • Different gaits (including sideways and backwards walking). • Can handle pushes in all directions, unexpected steps and slopes. (Video)
Control of Articulated Bodies • Overview • Control system. • One-legged hopper and dynamic locomotion. • Animating human athletics. • Automatically generated controllers. • Composable controllers, more intelligent behavior.
Ways to generate controllers automatically • Motivation: the techniques so far give good results, but require a lot of hand-tuning for new characters and motions. • Techniques for automatic generation of controllers: • SAN – Sensor-Actuator Networks [Panne,Fiume93]. • PSM – Parametrized State Machines [Panne96].
SAN – Sensor-Actuator Networks • The controller is a directed network (similar to neural network): • Input nodes – sensors (positions, angles, contact with ground). • Output (actuator) nodes - produce force/torque at a specific joint. • Intermediate nodes – compute the weighted sum of the inputs with some time delay.
SAN – Sensor-Actuator Networks • Generate random controllers, take the best 1-5% and do fine tuning on them. • Measure: distance traveled in T seconds. • Results: • Desk lamp. • Fish. • Video (Karl Sims’ Alife – not SAN, but similar results).
SAN – Sensor-Actuator Networks • Advantages: • Able to generate controllers for arbitrary bodies • Disadvantages: • Can not create complex motions. • The generated controller is hard to understand (and modify) by human.
PSM - Parametrized State Machines • Based on PCG – pose-control graph. • Each state represents a pose. (like key-framing) • Transition times are fixed. • No feedback! (i.e. open-loop control).
PSM - Parametrized State Machines • Again, random generation and local search for best solution. • Measure - the same - distance traveled in T seconds of simulation. • Results: • Walking Monster (3D) • Cheetah (2D)
PSM - Parametrized State Machines • Advantages: • Simple architecture and allows for interpolation between controllers (slow and fast walk). • Can be used to integrate aperiodic motions in walking. • Disadvantages: • Hard to generate complex motions. • No feedback. The balance is entirely dependant on the poses. • Very hard to generate unstable motions!
Control of Articulated Bodies • Overview • Control system. • One-legged hopper and dynamic locomotion. • Animating human athletics. • Automatically generated controllers. • Composable controllers, more intelligent behavior.
A higher level system with multiple controllers • [Faloutsos01] • Motivation: • Ability to integrate various behaviors in the same system. • Response to external forces and switching between behaviors: • Falling • Getting up • Walking again.
A higher level system with multiple controllers • The control system consists of: • A pool of controllers. • Supervising controller. • The individual controllers have: • pre-conditions: initial and target state, environment parameters, balance. • post-conditions: target state, environment parameters, balance.
A higher level system with multiple controllers • The supervising controller chooses which controller to execute: • Must satisfy the pre-conditions. (e.g. fallen) • If able to reach the goal position - even better. (crawling vs. standing-up)
A higher level system with multiple controllers • A controller can be deactivated for one of 3 reasons: • successfully performs the motion. • fails because of external forces/obstacles. • after user input.
A higher level system with multiple controllers • The hardest problem is determining the pre-conditions for each controller. • Can be solved efficiently by off-line learning. • Various states are sampled and a simulation is run. • SVM (support-vector machine) is used to do the learning. • 10,000 simulations can be learned in several minutes to a few hours (depending on SVM parameters).
Summary • Controllers so far: • Produce realistic animation in automated way. • Improved flexibility and diversity of motions. • What else can be done: • Reduce the number of parameters (simplify the design). • Add individual style to the motions. • Use motion data to generate controllers. • Motion planning for uneven terrain, error recovery. • More work on composable controllers.
Acknowledgments • Many pictures and formulas were taken from [2]. • Also from [1]. • And the other cited papers.
References • M. van de Panne - Control for Simulated human and animal motion, 2000. • J. Hodgins – Building Control Systems for Robot Locomotion, GDC 2000. • Multon, France, Cani-Gascuel, Debunne - Computer Animation of Human Walking: a Survey, 1999. • M. Raibert - 3D One-legged Hopper - http://www.ai.mit.edu/projects/leglab/robots/3D_hopper/3D_hopper.html, 1983. • J. Hodgins, M. Raibert - Animation of Dynamic Legged Locomotion, Proceedings of SIGGRAPH 1991. • J. Hodgins, W. Wooten, D. Brogan, J. O'Brien - Animating Human Athletics, SIGGRAPH 1995. • K. Sims - Evolving Virtual Creatures, SIGGRAPH 1994. • K. Yin, K. Loken, M. van de Panne - SIMBICON: Simple Biped Locomotion Control, SIGGRAPH 2007. • M. van de Panne, E. Fiume - Sensor Actuator Networks, Proceedings of SIGGRAPH 1993. • M. van de Panne – Parameterized Gait Synthesis, 1996. • P. Faloutsos, M. van de Panne, D. Terzopoulos - Composable Controllers for Physics-Based Character Animation, SIGGRAPH 2001.