%% Calculate Center of Mass and Jacobian for Robot Configuration
% Load a predefined KUKA LBR robot model, which is specified as a  RigidBodyTree object.

load exampleRobots.mat lbr

%
% Set the data format to 'row'. For all dynamics calculations, the data format must be either 'row' or 'column'.

lbr.DataFormat = 'row';

%
% Compute the center of mass position and Jacobian at the home configuration of the robot.

[comLocation,comJac] = centerOfMass(lbr);

% Copyright 2012 The MathWorks, Inc.