Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Advanced Programming for 3D Applications CE00383-3 Introduction to Human Motion Lecture 2 Bob Hobbs Staffordshire university General Outline • • • • • • 2 Human Skeleton Muscle Groups How Robots simulate humans Kinematics Gait Locomotion Human Dynamics • Users described as participants • basic interaction involves control of camera (viewpoint) – exploratory navigation / locomotion – Walk through systems • More advanced environment allow interaction – Touch , selection, manipulation – referred to as direct manipulation 3 Simulation of Body • Body model is the description of the interface • eyes are viual interface, ears are audio interface • geometric description drawn from egocentric point of view • description of hand and fingers forms basis of grasping simulation for picking up objects (Boulic 1996) 4 Simulation of Body -• The Building the body more points represneting the body the • • • • • • 5 more realistic the movement Up to 90 points for motion-capture in animation Standard for human skeleton (H-Anim 1999) More typically head, Torso, Both hands Inferred movement from limited points Inverse kinematics problem - infinite possibilities of movement in virtual environment, consistent restraint Elbow position in 4- Tracker system (Badler, 1993) H-Anim Humanoid L Hip L Knee L Ankle L Midtarsal Sacroiliac R Hip R Knee R Ankle L Shoulder L Elbow L Wrist R Shoulder R Elbow R Wrist vl5 Skullbase 6 R Midtarsal Simulation Of body - tracking the participant • Choice of system depends on 5 factors – accuracy, resolution, range, lag, update rate • Many different tracking technologies – Meyer 1992 – frequency and time • ultrasonic time-of-flight measurement • Pulsed Infra-red • GPS • Optical Gyroscopes • Phase difference 7 Simulation Of body - tracking the participant • Spatial Scan • Outside-in • Inside-out • Inertial sensing – mechanical gyroscope – Accelerometer • Mechanical Linkages • Direct - Field Sensing 8 Interaction with virtual Body • Limitations mean reliance on metaphors for – object manipulation (grasping and moving) – locomotion (movement) • Limitations in haptics mean that restraint on the virtual environment exists 9 Muscles • http://www.youtube.com/watch?v=T- ozRNVhGVg&feature=PlayList&p=37A3DC 6AF2D7C881&index=5 • http://www.youtube.com/watch?v=pbTah 5NVOtU&NR=1 10 The Musculotendinous Unit • Tendon- spring-like elastic component in series with contractile component (proteins) F • Parallel elastic component x (epimysium, perimysium, endomysium, sarcolemma) PEC: parallel elastic component CC: contractile component SEC: series elastic component 11 11 II. Mechanics of Muscle Contraction • Neural stimulation – impulse • Mechanical response of a motor unit - twitch t F (t ) F0 e T t T T: twitch or contraction time, time for tension to reach maximum F0: constant of a given motor unit Averaged T values Tricep brachii 44.5 ms Biceps brachii 52.0 ms Tibialis anterior 58.0 ms 12 Soleus 74.0 ms Medial Gastrocnemius 79.0 ms 12 Summation and tetanic contraction 13 (ms) 13 Generation of muscle tetanus 100Hz 10 Hz Note: muscle is controlled by frequency modulation from neural input very important in functional electrical stimulation 14 14 Wave summation & tetanization Critical frequency 15 15 Motor unit recruitment All-or-nothing event 2 ways to increase tension: - Stimulation rate - Recruitment of more motor unit Size principle Smallest m.u. recruited first Largest m.u. last 16 16 Models • Springs • Joints • Segments • Muscles Robots • Springs • Screws • Metal parts • Servos • Rubber simple, fast, easy to understand 17 Robotic Basics • Have moveable segments • Connected with joints • Robots spin wheels and pivot jointed segments • • • 18 with some sort of actuator Some robots use electric motors and solenoids as actuators some use a hydraulic system and some use a pneumatic system (a system driven by compressed gases). Robots may use all these actuator types. Robots usually have some sort of sensor Actuators • Electrical current • • 19 drives actuators controlling individual joints Directly to motors or solenoids To valves controlling flow of fluids to hydraulic or pneumatic systems Robot arm • Simplest sort of robot • Typical arm has 7 • • • • 20 segments, 6 joints 6DOF Human arm 7DOF Usually driven by Step Motors Main use is in manufacturing Robot Arm • Fitted with end effector • Usually interchangeable • Artificial Hand , paint gun, welding rod • Pressure sensor needed to prevent crushing • Programmed by incremental steps which are then replicated ad infinitum 21 Step Motor • electromagnetic, • 22 rotary actuator, that mechanically converts digital pulse inputs to incremental shaft rotation. The rotation not only has a direct relation to the number of input pulses, but its speed is related to the frequency of the pulses. Step Motor Each pulse corresponds to an angular rotation 23 Step Motors • Between steps holds position w/o brake or clutch • Can be programmed to move a precise number of steps and then hold position • Possible to be bi-directional • Rapid acceleration, deceleration and reversal • cf DC Servo motors 24 Choosing the right motor • Basic Types: – – – • Parameters to be considered – – – – 25 Variable Reluctance, Permanent Magnet, Hybrid Distance to be traversed. Maximum time allowed for a traverse. Desired detent (static) accuracy. Desired dynamic accuracy (overshoot). More parameters • • • • • • • 26 Settling time Required step resolutiong System friction System inertia. Speed/Torque characteristics of the motor: When selecting a motor/drive, the capacity of the motor must exceed the overall requirements of the load. Torque-to-inertia Ratio Torque Margin: Selecting a motor drive that provides at least 50% margin above the minimum required torque is ideal. Frameworks, Chains (or Skeletons) • A lot of mechanical objects in the real world consist of solid sections connected by joints • Obviously robot arm but also – Creatures such as humans and animals. – Car Suspension – Ropes, string and Chains 27 Frameworks, Chains (or Skeletons) • Sections and joints of robot arm are known as a 'chain‘ • In creatures could be referred to as a skeleton • Moveable sections correspond to bones • Attachments between bones are joints. 28 Frameworks, Chains (or Skeletons) • Motions of chains can be specified in terms of • • 29 translations and rotations. Forward Kinematics - From the amounts of rotation and bending of each joint in an arm, for example, the position of the hand can be calculated. Inverse Kinematics - If the hand is moved, the rotation and bending of the arm is calculated, in accordance with the length and joint properties of each section of the arm. Joint Translation-Rotation • We can use a transform • 30 (T) to transform each point relative to the body to a position in world coordinates. If we want to model both linear and angular (rotational) motion then we need to use a 4x4 matrix to represent the transform What is Inverse Kinematics? • Forward Kinematics ? End Effector Base 31 What is Inverse Kinematics? • Inverse Kinematics End Effector Base 32 What does looks like? ? End Effector Base 33 Solution to • Our example Number of equation : 2 Unknown variables : 3 Infinite number of solutions ! 34 Redundancy System DOF > End Effector DOF Our example System DOF = 3 End Effector DOF = 2 35 Redundancy • A redundant system has infinite number of solutions • Human skeleton has 70 DOF – Ultra-super redundant • How to solve highly redundant system? 36 Iterative solution • Start at end effector • Move each joint so that end gets closer to target • The angle of rotation for each joint is found by taking the dot product of the vectors from the joint to the current point and from the joint to the desired end point. Then taking the arcsin of this dot product. • To find the sign of this angle (ie which direction to turn), take the cross product of these vectors and checking the sign of the Z element of 37 the vector. Goal Potential Function • “Distance” from the end effector to the goal • Function of joint angles : G(q) 38 Our Example Goal distance End Effector Base 39 Ground reaction force (N) Dynamics of the long jump m1 k 40 Nonlinear spring-damper element m2 time (ms) Energetic losses may increase performance! Seyfarth et al. (1999) J. Biomech. Joint Structures • This allows two nodes to be attached to each other in a flexible way so that forces in the plane of the joint will be transmitted through it, but forces perpendicular to the joint will cause it to bend. This will provide IK like capabilities 41 Types of Joint 42 •Name •Symbol •DOF •Revolute joints •R •1 •Prismatic joints •P •1 •Helical joints •- •1 •Cylindrical joints •RP •2 •Spherical joints •3R •3 •Planar joints •RRP •3 Joint Structures • In character animation, only 2 types of joint • need to be considered. These are the "revolute" and "prismatic" joints. All other types can be based on these two. 1 degree of freedom: – rotational joint - wheel. – hinge - similar to rotational joint above but with limits to motion (end stops) • 2 degrees of freedom – ball & socket joint 43 Dynamics • Forward Dynamics - The movements are calculated from the forces, such as, force = mass * acceleration. • Inverse Dynamics - Constraints are applied which specifies how objects interact, for example, they may be linked by a hinge joint or a ball joint, and from this the forces can be calculated 44 Forward Dynamics 1. If no forces act on a particle, the particle retains its linear momentum. 2. The rate of change of the linear momentum of a particle is equal to the sum of all forces acting on it. 3. When two particles exert forces upon each other, these forces are equal in magnitude and opposite in direction. 45 Forward Dynamics • These laws can also be applied to rigid bodies • by assuming that the forces are acting on the centre of mass of the object. Assuming that the mass is constant then the second law becomes: – force = mass * acceleration • Euler extended these laws to include rotation. So there are equivalent laws for rotation such as: – 46 torque = inertia * angular acceleration. What is a robot? • Joseph Engelberger, a pioneer in industrial • • • 47 robotics, once remarked "I can't define a robot, but I know one when I see one." Many different machines called robots Everybody has a different idea of what constitutes a robot Name from robota – forced labour What relevance to us? • VR models use robotic principles • Avatars behave like robots • Simulations of robots used to test real robots • May be used to control remote robotics 48 Virtual Actors: Autonomous or Guided Guided Actors are Slaved to the Motions of a Human Participant Using Body Tracking – Optical, mechanical, . . . – A.K.A. Avatar • Autonomous Actors Are Controlled by Behavior Modeling Programs, and Can - Augment or replace human participants - Serve as surrogate instructors - Act as guides in complex synthetic worlds • Hybrid Control Desirable - VRLOCO uses interaction to invoke and control locomotion behaviors 49 The Weiss 6-Level Motor Organization Hierarchy 50 3. Muscle Group - Coordinated action of several muscles - Motion at one joint 2. Muscle - Muscle contraction 1. Motor Unit - Neuron + muscle fibers - Twitching, shivering Organism Level 6. Motor Behavior 5. Motor Organ System 4. Motor Organ 3. Muscle Group 2. Muscle 1. Motor Unit Neuron Level The Weiss 6-Level Motor Organization Hierarchy 6. Motor Behavior - Movement of the whole organism - E.G., Goal-directed locomotion - Task manager 5. Motor Organ System - Coordinated action of several limbs - E.g., Walking - Motor programs, skills 4. Motor Organ - Coordinated action of several joints - E.G., Stepping motion of a limb - Local motor programs 51 Organism Level 6. Motor Behavior 5. Motor Organ System 4. Motor Organ 3. Muscle Group 2. Muscle 1. Motor Unit Neuron Level Motion and Reaction • Sensorymotor level - Levels 1 - 5 - Peripheral and proprioceptive feedback associated with reflex arcs - Motor programs and reflexes coordinate and control motion - Executes behaviors • Reactive level – Level 6 and higher - Perception triggers and modulates behavior - Organism responds to environmental stimuli to select and compose behaviors - Selects behaviors 52 Organization of a Virtual Actor Organism Level Level 6 and above Reactive level Levels 1-5 Sensorymotor level 6. Motor Behavior 5. Motor Organ System 4. Motor Organ 3. Muscle Group 2. Muscle 1. Motor Unit Neuron Level 53 Virtual Actor 54 55 Abstraction and Interaction 56 Representation and Abstraction 57 58 Finite State Machines for Walking 59 Control and Abstraction 60 Avatars 61 Kinematic Chains • Solid links connected at movable joints • Fixed end: base • Movable end: tip or end effector • One degree of freedom (DOF) per joint • Open chain: one fixed end, one movable end • Closed chain: both ends fixed 62 Forward and Inverse Kinematics 63 Kinematic Redundancy • End-effector has 6 DoFs - (x, y, z) position - ( , , ) orientation • Non-redundant linkage has < = 6 joints (DoFs) • Redundant linkage has > 6 joints (DoFs) - Human arm has 7 DoFs » Shoulder 3 » Elbow 1 » Forearm 1 » Wrist 2 - Redundancy enables multiple solutions 64 Inverse Kinematics (IK) • Non-redundant Linkages - Analytical solutions • Redundant Linkages - Many techniques » Pseudo-inverse (Jacobian) » Gradient » Others • IK Commonly Found in Animation Packages - 3D Studio Max 65 Static Balance 66 Weight • Bend: – Non-weight-bearing motion – Traverse subtree rooted at rotating joint • Pivot – Weight-bearing motion – Traverse entire tree starting at root EXCEPT for subtree rooted at rotating joint • Critical Element of Realism – Is the character supported by its legs, or are the legs dangling in space as the character is translated along? 67 Bend Non-weight-bearing motion – traverse subtree rooted at rotating joint 68 Pivot Weight-bearing motion 69 – traverse entire tree starting at root EXCEPT for subtree rooted at rotating joint Gait Parameters 70 • Gait Pattern – Sequence of lifting and placing feet • Gait Cycle – One repetition Of the gait pattern • Period – Duration of one gait cycle • Relative Phase of Leg I – Fraction of gait cycle before leg I is lifted • Duty Factor – Fraction of gait cycle period a given leg spends on ground • Swing Time – Time a leg spends In the air • Stance Time – Time a leg spends On the ground • Stroke – Distance body travels during a leg's stance time Finite State Machines for Walking 71 Locomotion • Tracker has a limited range • Must use locomotion metaphor to move greater distances • Locomotion is on an even plane , virtual terrain may not be even • Collision detection can be employed to raise or lower the participant accordingly 72 Directions of locomotion Fly in direction of aim Fly in direction of pointing Fly in direction of gaze Fly in direction of torso 73