Computer Animation: Hierarchical Kinematic Modeling - PowerPoint PPT Presentation

1 / 37
About This Presentation
Title:

Computer Animation: Hierarchical Kinematic Modeling

Description:

Explore multiple approaches to developing and working with models of geometric objects. ... CCD (Cyclic-Coordinate Descent): Making Kine More Flexible (Jeff Lander) ... – PowerPoint PPT presentation

Number of Views:138
Avg rating:5.0/5.0
Slides: 38
Provided by: abdennour8
Category:

less

Transcript and Presenter's Notes

Title: Computer Animation: Hierarchical Kinematic Modeling


1
Computer Animation Hierarchical Kinematic
Modeling
Abdennour El Rhalibi
2
Introduction
  • Explore multiple approaches to developing and
    working with models of geometric objects.
  • Extend the use of transformations from to include
    hierarchical relationships among the objects.
  • The techniques that we develop are appropriate
    for applications, such as robotics and figure
    animation, where the dynamic behavior of the
    objects is characterized by relationships among
    the parts of the model.

3
Symbols and Instances
  • Our first concern is how to store a model that
    may include many sophisticated objects.
  • There are two immediate issues
  • How do we define a complex object
  • How do we represent a collection of these
    objects.
  • We can take a non hierarchical approach to
    modeling regarding these objects as symbols, and
    modeling our world as a collection of symbols

4
  • Symbols are usually represented at a convenient
    size and orientation.
  • For example a cylinder
  • In OpenGL we have to set up the appropriate
    transformation from the frame of the symbol to
    the world coordinate frame to apply it to the
    model-view matrix before we execute the code for
    the symbol.

5
  • For example the instance transformation
  • M TRS
  • is a concatenation of a translation, a rotation,
    and a scale
  • And the OpenGL program often contains this code
  • glMatrixMode(GL_MODELVIEW)
  • glLoadIdentity()
  • glTranslatef(...)
  • glRotatef(...)
  • glScalef(...)
  • glutSolidCylinder(...)

6
  • We can also think of such a model in the form of
    a table
  • The table shows no relationship among the
    objects. However, it does contain everything we
    need to draw the objects.
  • We could do a lot of things with this data
    structure, but its flatness limits us.

7
Hierarchical Models
  • Suppose we wish to build an automobile that we
    can animate
  • We can build it from the chassis, and 4 wheels

8
  • Two frames of our animation could look like this
  • We could calculate how far the wheel moved, and
    have code that looks like
  • calculate(speed, distance)
  • draw_right_front_wheel(speed, dist)
  • draw_left_front_wheel(speed, dist)
  • draw_right_rear_wheel(speed, dist)
  • draw_left_rear_wheel(speed, dist)
  • draw_chassis(speed, dist)

9
  • BUT this is the kind of code we do NOT want....
  • It is linear, and it shows none of the
    relationships between the 5 objects.
  • There are two types of relationships we wish to
    convey
  • First, we cannot separate the movement of the car
    from the movement of the wheels
  • If the car moves forward, the wheels must turn.
  • Second, we would like to note that all the wheels
    are identical and just located and oriented
    differently.
  • We typically do this with a graph.
  • Def node, edge, root, leaf, ...

10
  • Tree Representation
  • DAG Representation

11
A Robot Arm
  • Robotics provides many opportunities for
    developing hierarchical models.
  • Consider this arm
  • It consists of 3 parts

12
  • The mechanism has 3 degrees of freedom, each of
    which can be described by a joint angle between
    the components
  • In our model, each joint angle determines how to
    position a component with respect to the
    component to which it is attached
  • q - rotation of the base
  • f - rotation of first arm
  • y - rotation of second arm piece.

13
  • We could write it as follows
  • display()
  • glRotatef(theta, 0.0, 1.0, 0.0)
  • base()
  • glTranslatef(0.0, h1, 0.0)
  • glRotatef(phi, 0.0, 0.0, 1.0)
  • lower_arm()
  • glTranslatef(0.0, h2, 0.0)
  • glRotatef(0.0, 0.0, 1.0)
  • upper_arm()

14
  • Note that we have described the positioning of
    the arm independently of the details of the
    individual parts.
  • We have also put it into a tree structure
  • This makes it possible to write separate programs
    to describe the components and animate the robot.
  • Drawing an object stored in a tree requires
    performing a tree traversal (you must visit every
    node)

15
Tree Traversal
  • Here we have a box-like representation of a human
    figure.
  • We can represent this figure as a tree

16
  • If we put the matrices with each node we can
    specify exactly how to draw the robot
  • The issue is how to traverse the tree...
  • Typically you do a pre-order traversal.
  • This can be done in two ways
  • with code and a stack
  • recursively (implicit stack)

17
  • A Stack-Based Traversal
  • Consider the code necessary to draw the Robot.
  • This function might be called from the display
    callback
  • The Model-View matrix, M, in effect when the
    function is invoked determines the position of
    the robot relative to the rest of the scene.

18
  • The function must manipulate the model-view
    matrix before each part of the robot is drawn.
  • In addition to the usual OpenGL functions for
    rotation, translation, and scaling, the functions
    glPushMatrix and glPopMatrix are particularly
    helpful for traversing our tree.
  • The first glPushMatrix duplicates the current
    model-view matrix
  • assuming that we have done a previous
    glMatrixMode(GL_MODELVIEW)
  • When we have finished with changes we can do a
    glPopMatrix to get back the original one saved
  • Note we must do another glPushMatrix to leave a
    copy that we can later go back to.

19
(No Transcript)
20
(No Transcript)
21
(No Transcript)
22
Animation
  • Our robot example is articulated
  • consists of rigid parts connected by joints
  • We can make such models change their positions in
    time - animate them - by altering a small set of
    parameters.
  • Hierarchical models allow us to reflect correctly
    the compound motions incorporating the physical
    relationships among parts of the model.

23
  • Of the many approaches to animation, a few basic
    techniques are of particular importance when we
    work with articulated figures.
  • Kinematics
  • describing the position of the parts of the model
    based on only their joint angles.
  • Inverse kinematics and inverse dynamics
  • given a desired state of the model, how can we
    adjust the angles so as to achieve this position?
  • key-frame animation
  • position the objects at a set of times.
  • Inbetweening
  • then fill in (interpolate).

24
Definitions
  • Hierarchical modeling
  • connectivity constraints among objects organized
    in a treelike structure
  • planetary systems
  • multibody jointed chains (animals, humans) -gt
    articulated
  • Articulated figures (lt robotics)
  • manipulator sequence of objects connected in a
    chain by joints
  • links rigid objects forming the connections
    between joints
  • end effector free end of the chain
  • frame local coordinate system associated with
    each joint
  • joints revolute vs. prismatic
  • DOF degree of freedom motion in one direction

25
Representing Hierarchical Models (i)
26
Representing Hierarchical Models (ii)
27
Forward Kinematics
  • Definition
  • Manual manipulation of rotation parameters at
    joints
  • Evaluation of hierarchy produces figure in
    position that reflects the setting of the joint
    parameters
  • Difficulty
  • getting desired position is tedious
    trial-and-error
  • Solution
  • inverse kinematics (IK)

28
Example 2-Link Structure
29
Forward Kinematics
30
Forward Kinematics
31
Forward Kinematics
32
Forward Kinematics
33
Inverse Kinematicsdefinition
  • Definition
  • desired position (and orientation) of
    end-effector given by user
  • joint angles are calculated automatically
  • Possible solutions
  • analytically for simple mechanisms
  • incremental for complicated mechanisms
  • CCD (Cyclic-Coordinate Descent) Making Kine More
    Flexible (Jeff Lander)
  • inverse Jacobian Computer Animation Algorithms
    and Techniques
  • transposed Jacobian IK and Geometric Constraints
    for Articulated Figure Manipulation (Chris
    Welman)

34
Example 2-Link Structure
35
Inverse Kinematics
36
Inverse Kinematics
37
Summary
Write a Comment
User Comments (0)
About PowerShow.com