Rigid body simulation. Once we consider an object with spatial extent, particle system simulation is no longer sufficient

Similar documents
Lesson Rigid Body Dynamics

Rigid body dynamics. Basilio Bona. DAUIN - Politecnico di Torino. October 2013

Motion in Space. MATH 311, Calculus III. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Motion in Space

Rigid Body Dynamics and Beyond

Rotational & Rigid-Body Mechanics. Lectures 3+4

Artificial Intelligence & Neuro Cognitive Systems Fakultät für Informatik. Robot Dynamics. Dr.-Ing. John Nassour J.

Manipulator Dynamics 2. Instructor: Jacob Rosen Advanced Robotic - MAE 263D - Department of Mechanical & Aerospace Engineering - UCLA

Rigid body simulation

CP1 REVISION LECTURE 3 INTRODUCTION TO CLASSICAL MECHANICS. Prof. N. Harnew University of Oxford TT 2017

Rotational Motion. Chapter 4. P. J. Grandinetti. Sep. 1, Chem P. J. Grandinetti (Chem. 4300) Rotational Motion Sep.

1/30. Rigid Body Rotations. Dave Frank

Phys 7221 Homework # 8

General Physics I. Lecture 10: Rolling Motion and Angular Momentum.

6. 3D Kinematics DE2-EA 2.1: M4DE. Dr Connor Myant

Game Physics. Game and Media Technology Master Program - Utrecht University. Dr. Nicolas Pronost

Part 8: Rigid Body Dynamics

Multibody simulation

Closed-Form Solution Of Absolute Orientation Using Unit Quaternions

A DARK GREY P O N T, with a Switch Tail, and a small Star on the Forehead. Any

Exercise 1: Inertia moment of a simple pendulum

PSE Game Physics. Session (6) Angular momentum, microcollisions, damping. Oliver Meister, Roland Wittmann

Chapter 6: Momentum Analysis

In this section of notes, we look at the calculation of forces and torques for a manipulator in two settings:

AB-267 DYNAMICS & CONTROL OF FLEXIBLE AIRCRAFT

Dynamics. 1 Copyright c 2015 Roderic Grupen

SOLUTIONS, PROBLEM SET 11

Physics 106b/196b Problem Set 9 Due Jan 19, 2007

Classical Mechanics. Luis Anchordoqui

Chapter 6: Momentum Analysis of Flow Systems

f x f y or else = m a y

CIS 4930/6930: Principles of Cyber-Physical Systems

Spacecraft Dynamics and Control

CS 480/680: GAME ENGINE PROGRAMMING

Leonhard Euler ( September 1783)

Lecture II: Rigid-Body Physics

Final Exam. June 10, 2008, 1:00pm

Angular Momentum. Objectives CONSERVATION OF ANGULAR MOMENTUM

α = p = m v L = I ω Review: Torque Physics 201, Lecture 21 Review: Rotational Dynamics a = Στ = I α

Rigid Body Rotation. Speaker: Xiaolei Chen Advisor: Prof. Xiaolin Li. Department of Applied Mathematics and Statistics Stony Brook University (SUNY)

The Calculus of Vec- tors

9 Kinetics of 3D rigid bodies - rotating frames

Symmetries 2 - Rotations in Space

Dynamics. Basilio Bona. Semester 1, DAUIN Politecnico di Torino. B. Bona (DAUIN) Dynamics Semester 1, / 18

CS-184: Computer Graphics

particle p = m v F ext = d P = M d v cm dt

Rotational Motion and Torque

z F 3 = = = m 1 F 1 m 2 F 2 m 3 - Linear Momentum dp dt F net = d P net = d p 1 dt d p n dt - Conservation of Linear Momentum Δ P = 0

Physics 201, Lecture 21

Rigid bodies - general theory

Dynamics of Open Chains

Thursday Simulation & Unity

PLANAR KINETIC EQUATIONS OF MOTION (Section 17.2)

Autonomous Underwater Vehicles: Equations of Motion

MECH 5312 Solid Mechanics II. Dr. Calvin M. Stewart Department of Mechanical Engineering The University of Texas at El Paso

Handout 7: Torque, angular momentum, rotational kinetic energy and rolling motion. Torque and angular momentum

Chapter 4 The Equations of Motion

Kinematics (special case) Dynamics gravity, tension, elastic, normal, friction. Energy: kinetic, potential gravity, spring + work (friction)

If the symmetry axes of a uniform symmetric body coincide with the coordinate axes, the products of inertia (Ixy etc.

In this section, mathematical description of the motion of fluid elements moving in a flow field is

Chapter 8 Rotational Equilibrium and Rotational Dynamics Force vs. Torque Forces cause accelerations Torques cause angular accelerations Force and

Distance travelled time taken and if the particle is a distance s(t) along the x-axis, then its instantaneous speed is:

Game Physics. Game and Media Technology Master Program - Utrecht University. Dr. Nicolas Pronost

Projects. Assignments. Plan. Motivational Films. Motivational Film 1/6/09. Dynamics II. Forces, Collisions and Impulse

Translational and Rotational Dynamics!

ω = 0 a = 0 = α P = constant L = constant dt = 0 = d Equilibrium when: τ i = 0 τ net τ i Static Equilibrium when: F z = 0 F net = F i = ma = d P

Lecture 10 - Moment of Inertia

Introduction to Haptic Systems

Kinetic Energy of Rolling

Chapter 8. Rotational Equilibrium and Rotational Dynamics

Game Physics: Basic Concepts

Spatial Vector Algebra

Applications of Eigenvalues & Eigenvectors

3-D Kinetics of Rigid Bodies

Chapter 9. Rotational Dynamics

Sec. 1.1: Basics of Vectors

Momentum. The way to catch a knuckleball is to wait until it stops rolling and then pick it up. -Bob Uecker

Chapter 11. Angular Momentum

Lecture 8 Analyzing the diffusion weighted signal. Room CSB 272 this week! Please install AFNI

Lecture AC-1. Aircraft Dynamics. Copy right 2003 by Jon at h an H ow

13, Applications of molecular symmetry and group theory

General Relativity ASTR 2110 Sarazin. Einstein s Equation

OCN/ATM/ESS 587. The wind-driven ocean circulation. Friction and stress. The Ekman layer, top and bottom. Ekman pumping, Ekman suction

Flips are Fun: A Study in the Conservation of Angular Momentum of a Non-Rigid Human Body

Application of Forces. Chapter Eight. Torque. Force vs. Torque. Torque, cont. Direction of Torque 4/7/2015

Rotational Motion, Torque, Angular Acceleration, and Moment of Inertia. 8.01t Nov 3, 2004

16.3 Conservative Vector Fields

LOWELL WEEKLY JOURNAL

Lecture 17 - Gyroscopes

Classical Mechanics Lecture 15

M E 320 Professor John M. Cimbala Lecture 10

Forces of Rolling. 1) Ifobjectisrollingwith a com =0 (i.e.no netforces), then v com =ωr = constant (smooth roll)

Robot Control Basics CS 685

Work - kinetic energy theorem for rotational motion *

Properties of surfaces II: Second moment of area

PHYSICS 44 {CLASSICAL MECHANICS 2003 SUMMER FINAL EXAM { SOLUTIONS

ELECTROMAGNETIC WAVES

Classical Mechanics Comprehensive Exam Solution

Chapters 10 & 11: Rotational Dynamics Thursday March 8 th

Problem Set 2 Due Tuesday, September 27, ; p : 0. (b) Construct a representation using five d orbitals that sit on the origin as a basis: 1

Two-Dimensional Rotational Kinematics

Transcription:

Rigid body dynamics

Rigid body simulation Once we consider an object with spatial extent, particle system simulation is no longer sufficient

Rigid body simulation Unconstrained system no contact Constrained system collision and contact

Problems Performance is important!

Problems Control is difficult!

Particle simulation Y(t) = [ x(t) v(t) ] Position in phase space Ẏ(t) = [ v(t) f(t)/m ] Velocity in phase space

Rigid body concepts Translation Position Linear velocity Mass Linear momentum Force Rotation Orientation Angular velocity Inertia tensor Angular momentum Torque

Position and orientation Linear and angular velocity Mass and Inertia Force and torques Simulation

Position and orientation Translation of the body x(t) = x y z Rotation of the body R(t) = r xx r yx r zx r xy r yy r zy r xz r yz r zz x(t) and R(t) are called spatial variables of a rigid body

Body space Body space y 0 A fixed and unchanged space where the shape of a rigid body is defined z 0 r 0i x 0 The geometric center of the rigid body lies at the origin of the body space

Position and orientation Body space World space y0 R(t) y0 r0i z0 y x0 z0 z x(t) x r0i x0

Position and orientation Use x(t) and R(t) to transform the body space into world space World space y 0 What s the world coordinate of an arbitrary point r 0i on the body? R(t) z 0 r 0i x 0 y x(t) r i (t) =x(t)+r(t)r 0i z x

Position and orientation Assume the rigid body has uniform density, what is the physical meaning of x(t)? center of mass over time What is the physical meaning of R(t)? it s a bit tricky

Position and orientation Consider the x-axis in body space, (1, 0, 0), what is the direction of this vector in world space at time t? R(t) 1 0 0 = r xx r xy r xz which is the first column of R(t) R(t) represents the directions of x, y, and z axes of the body space in world space at time t

Position and orientation So x(t) and R(t) define the position and the orientation of the body at time t Next we need to define how the position and orientation change over time

Position and orientation Linear and angular velocity Mass and Inertia Force and torques Simulation

Linear velocity Since x(t) is the position of the center of mass in world space, ẋ(t) is the velocity of the center of mass in world space v(t) =ẋ(t)

Angular velocity If we freeze the position of the COM in space then any movement is due to the body spinning about some axis that passes through the COM Otherwise, the COM would itself be moving

Angular velocity We describe that spin as a vector ω(t) Direction of ω(t)? Magnitude of ω(t)? Linear position and velocity are related by v(t) = d dt x(t) How are angular position (orientation) and velocity related?

Angular velocity How are R(t) and ω(t) related? Hint: Consider a vector c(t) at time t specified in world space, how do we represent ċ(t) in terms of ω(t) ω(t) ċ(t) = b ω(t) = ω(t) b a b c ċ ċ(t) =ω(t) b = ω(t) b + ω(t) a ċ(t) =ω(t) c(t)

Angular velocity Given the physical meaning of column of Ṙ(t) mean? R(t), what does each At time t, the direction of x-axis of the rigid body in world space is the first column of R(t) r xx r xy r xz At time t, what is the derivative of the first column of R(t)? 2 3 2 3 4 r xx r xy r xz 5 =!(t) 4 r xx r xy r xz 5

Angular velocity Ṙ(t) = ω(t) r xx r xy r xz ω(t) r yx r yy r yz ω(t) r zx r zy r zz This is the relation between angular velocity and the orientation, but it is too cumbersome We can use a trick to simplify this expression

Angular velocity Consider two 3 by 1 vectors: a and b, the cross product of them is a b = a yb z b y a z a x b z + b x a z a x b y b x a y Given a, let s define a* to be a skew symmetric matrix 0 a z a y a z 0 a x a y a x 0 then a b = 0 a z a y a z 0 a x a y a x 0 b x b y b z = a b

Angular velocity Ṙ(t) = ω(t) r xx r xx r xy r xy ω(t) r yx r yx r yy r yy ω(t) ω(t) r zx r zy r zx r zy r xz r xz r yz r yz r zz r zz = ω(t) R(t) Vector relation: ċ(t) =ω(t) c(t) Matrix relation: Ṙ = ω(t) R(t)

Perspective of particles Imagine a rigid body is composed of a large number of small particles the particles are indexed from 1 to N each particle has a constant location r 0i in body space the location of i-th particle in world space at time t is r i (t) =x(t)+r(t)r 0i

Velocity of a particle ṙ(t) = d dt r(t) =ω R(t)r 0i + v(t) = ω (R(t)r 0i + x(t) x(t)) + v(t) = ω (r i (t) x(t)) + v(t) ṙ i (t) =ω (r i (t) x(t)) + v(t) angular component linear component

Velocity of a particle ṙ i (t) =ω (r i (t) x(t)) + v(t) y 0 ω(t) ω(t) (r i (t) x(t)) x(t) r i (t) ṙ i (t) v(t) y z 0 v(t) x 0 z x

Position and orientation Linear and angular velocity Mass and Inertia Force and torques Simulation

Mass The mass of the i-th particle is m i Mass M = N i=1 m i Center of mass in world space mi r i (t) M What about center of mass in body space? (0, 0, 0)

Center of mass Proof that the center of mass at time t in word space is x(t) mi r i (t) M = = x(t)

Inertia tensor Inertia tensor describes how the mass of a rigid body is distributed relative to the center of mass I = X i 2 6 4 m i (r 0 2 iy + r 0 2 iz ) m i rix 0 r0 iy m i rix 0 r0 iz m i riy 0 r0 iz m i r 0 iy r0 ix m i (r 0 2 ix + r 0 2 iz ) m i r 0 iz r0 ix m i r 0 iz r0 iy m i (r 0 2 ix + r 0 2 iy ) 3 7 5 r i = r i (t) x(t) I(t) depends on the orientation of a body, but not the translation For an actual implementation, we replace the finite sum with the integrals over a body s volume in world space

Inertia tensor Inertia tensors vary in world space over time But are constant in the body space Pre-compute the integral part in the body space to save time

Inertia tensor Pre-compute I body that does not vary over time I(t) = X m i r 0T i r 0 i 2 4 1 0 0 0 1 0 0 0 1 3 5 2 4 m i r 02 ix m i r 0 ix r0 iy m i r 0 ix r0 iz m i r 0 iy r0 ix m i r 02 iy m i r 0 iy r0 iz m i r 0 iz r0 ix m i r 0 iz r0 iy m i r 02 iz 3 5 I(t) = m i (r T i r i)1 r ir T i ) = m i ((R(t)r 0i ) T (R(t)r 0i )1 (R(t)r 0i )(R(t)r 0i ) T ) = m i (R(t)(r T 0ir 0i )R(t) T 1 R(t)r 0i r T 0iR(t) T ) ( ) = R(t) mi ((r T 0ir 0i )1 r 0i r T 0i) R(t) T I(t) =R(t)I body R(t) T I body = i m i ((r T 0ir 0i )1 r 0i r T 0i)

Inertia tensor Pre-compute I body that does not vary over time I(t) = X m i r 0T i r 0 i 2 4 1 0 0 0 1 0 0 0 1 3 5 2 4 m i r 02 ix m i r 0 ix r0 iy m i r 0 ix r0 iz m i r 0 iy r0 ix m i r 02 iy m i r 0 iy r0 iz m i r 0 iz r0 ix m i r 0 iz r0 iy m i r 02 iz 3 5 I(t) = m i (r T i r i)1 r ir T i ) = m i ((R(t)r 0i ) T (R(t)r 0i )1 (R(t)r 0i )(R(t)r 0i ) T ) = m i (R(t)(r T 0ir 0i )R(t) T 1 R(t)r 0i r T 0iR(t) T ) ( ) = R(t) mi ((r T 0ir 0i )1 r 0i r T 0i) R(t) T I(t) =R(t)I body R(t) T I body = i m i ((r T 0ir 0i )1 r 0i r T 0i)

Approximate inertia tensor Bounding boxes Pros: simple Cons: inaccurate

Approximate inertia tensor Point sampling Pros: simple, fairly accurate Cons: expensive, requires volume test

Approximate inertia tensor Green s theorem D F ds = Pros: simple, exact Cons: require boundary representation D ( F) da

Position and orientation Linear and angular velocity Mass and Inertia Force and torques Simulation

Force and torque F i (t) denotes the total force from external forces acting on the i-th particle at time t y 0 τ(t) =(r i (t) x(t)) F i (t) F(t) = i F i (t) x(t) r i (t) F i (t) τ(t) = i (r i (t) x(t)) F i (t) z 0 x 0 y z x

Force and torque F(t) conveys no information about where the various forces acted on the body!(t) contains the information about the distribution of the forces over the body Which one depends on the location of the particle relative to the center of mass?

Linear momentum P(t) = i m i ṙ i (t) = i m i v(t)+ω(t) i m i (r i (t) x(t)) = Mv(t) Total linear moment of the rigid body is the same as if the body was simply a particle with mass M and velocity v(t)

Angular momentum Similar to linear momentum, angular momentum is defined as L(t) =I(t)ω(t) Does L(t) depend on the translational effect x(t)? Does L(t) depend on the rotational effect R(t)? What about P(t)?

Derivative of momentum Change in linear momentum is equivalent to the total forces acting on the rigid body Ṗ(t) =M v(t) =F(t) The relation between angular momentum and the total torque is analogous to the linear case L(t) =τ(t)

Derivative of momentum Proof L(t) =τ(t) = r i F i m i r i F i = m i ( v ṙ i ω r i ω) F i = 0 r i m i ( v ṙ i ω r i ω) r i F i = 0 ( ) ( ) mi r i ṙ i ω mi r i r i ω = τ mi r i r i = m i ((r T i r i)1 r ir T i )=I(t) ( ) mi r i ṙ i ω + I(t) ω = τ İ(t) = d dt mi r i r i = m i r i ṙ i m i ṙ i r i İ(t)ω + I(t) ω = d dt (I(t)ω) = L(t) =τ

Position and orientation Linear and angular velocity Mass and Inertia Force and torques Simulation

Equation of motion Y(t) = x(t) R(t) P(t) L(t) position orientation linear momentum angular momentum d dt Y(t) = v(t) ω(t) R(t) F(t) τ(t) Constants: M and I body v(t) = P(t) M I(t) =R(t)I body R(t) T ω(t) =I(t) 1 L(t)

Momentum vs. velocity Why do we use momentum in the phase space instead of velocity? Because the relation of angular momentum and torque is simple Because the angular momentum is constant when there is no torques acting on the object Use linear momentum P(t) to be consistent with angular velocity and acceleration

Example: 1. compute the I body in body space y ( x0 2, y ) 0 2, z 0 2 I body = M 12 y 2 0 + z 2 0 0 0 0 x 2 0 + z 2 0 0 0 0 x 2 0 + y 2 0 ( x 0 2, y 0 2, z ) 0 2 z x

Example: 1. compute the I body in body space y 2. rotation free movement ( 3, 0, 2) (3, 0, 2) x F z F

Example: 1. compute the I body in body space y 2. rotation free movement 3. translation free movement ( 3, 0, 2) (3, 0, 2) x F z F

Force vs. torque puzzle 10 sec later F energy = 0 F energy = 1 2 MvT v Suppose a force F acts on the block at the center of mass for 10 seconds. Since there is no torque acting on the block, the body will only acquire linear velocity v after 10 seconds. The kinetic energy will be 1 2 MvT v F energy = 0 Now, consider the same force acting off-center to the body for 10 seconds. Since it is the same force, the velocity of the center of mass after 10 seconds is the same v. However, the block will also pick up some angular velocity ω. The kinetic energy will be 1 2 MvT v + 1 2 ωt Iω If identical forces push the block in both cases, how can the energy of the block be different?

Notes on implementation Using quaternion instead of transformation matrix more compact representation less numerical drift

Quaternion q(t) = 2 6 4 w x y z 3 7 5 q(t) = 1 2 apple 0!(t) q(t) quaternion multiplication

Equation of motion Y(t) = 2 6 4 x(t) q(t) P(t) L(t) 3 7 5 position orientation linear momentum angular momentum d dt Y(t) = 2 6 4 1 2 apple v(t) 0!(t) F(t) (t) q(t) 3 7 5 Constants: M and I body v(t) = P(t) M I(t) =R(t)I body R(t) T ω(t) =I(t) 1 L(t)

Exercise Consider a 3D sphere with radius 1m, mass 1kg, and inertia I body. The initial linear and angular velocity are both zero. The initial position and the initial orientation are x 0 and R 0. The forces applied on the sphere include gravity (g) and an initial push F applied at point p. Note that F is only applied for one time step at t 0. If we use Explicit Euler method with time step h to integrate, what are the position and the orientation of the sphere at t 2? Use the actual numbers defined as below to compute your solution (except for g and h).

What s next?

Collision, collision, collision Read: Unconstrained rigid body dynamics by Baraff and Witkin