20 lines
539 B
Mathematica
20 lines
539 B
Mathematica
|
|
function GravityForce = calculateGravityForce(thetaMea)
|
||
|
|
% Example:
|
||
|
|
% thetalist = [0;0;0;0;0;pi/2;0;0;0];
|
||
|
|
% calculateGravityForce([thetalist])
|
||
|
|
|
||
|
|
% code start
|
||
|
|
opt.robot_def = 'direct';
|
||
|
|
opt.KM_method = 'SCREW';
|
||
|
|
opt.Vel_method = 'Direct';
|
||
|
|
opt.LD_method = 'Direct';
|
||
|
|
opt.debug = true;
|
||
|
|
opt.robotName = 'R1000_DVT';
|
||
|
|
opt.reGenerate = false;
|
||
|
|
opt.Isreal = true;
|
||
|
|
zero_ = zeros(length(thetaMea),1);
|
||
|
|
|
||
|
|
robot = get_robot_R1000_DVT(zero_,zero_,zero_,opt);
|
||
|
|
robot = get_Kinematics_R1000_DVT(robot, opt);
|
||
|
|
GravityForce = getGravityForce(thetaMea, robot, opt);
|