Path: Common/MassProperties
% Computes inertia and center of mass for a chain of bodies - The origin is hinge 1. rHinge goes from hinge k to hinge k+1 - rCM goes from hinge k to the body k center of mass - b is the rotation matrix at the hinge - The first element in each body is body 1. - This is for a single chain. Branches are not allowed. Type InertiaChain for a demo of two bodies with hinge vectors along x. -------------------------------------------------------------------------- Form: inr,cM] = InertiaChain(rHinge,rCM,b,mass,inr) -------------------------------------------------------------------------- ------ Inputs ------ rHinge (3,n) Vectors from the hinge k to hinge k+1 rCM (3,n) Vectors from the hinge k to body k center of mass b {n} 3x3 rotation matrix, 4 by 1 quaternion or 3x1 Euler angles at the hinge for each hinge mass (1,n) Mass of each body inr {n} Inertia matrices about the body k center of mass ------- Outputs ------- inrTotal (3,3) Inertia cM (3,1) Center of Mass massTotal (1,1) Mass total --------------------------------------------------------------------------
Common: General/DispWithTitle Common: Quaternion/Q2Mat Common: Transform/Eul2Mat Math: Linear/SkewSq
Back to the Common Module page