Update the way to compute the Jacobian
This commit is contained in:
parent
b853bf4a95
commit
dcae695e55
28
.gitignore
vendored
28
.gitignore
vendored
@ -1,2 +1,28 @@
|
|||||||
*.autosave
|
# Windows default autosave extension
|
||||||
|
*.asv
|
||||||
|
|
||||||
|
# OSX / *nix default autosave extension
|
||||||
|
*.m~
|
||||||
|
|
||||||
|
# Compiled MEX binaries (all platforms)
|
||||||
|
*.mex*
|
||||||
|
|
||||||
|
# Packaged app and toolbox files
|
||||||
|
*.mlappinstall
|
||||||
|
*.mltbx
|
||||||
|
|
||||||
|
# Generated helpsearch folders
|
||||||
|
helpsearch*/
|
||||||
|
|
||||||
|
# Simulink code generation folders
|
||||||
slprj/
|
slprj/
|
||||||
|
sccprj/
|
||||||
|
|
||||||
|
# Simulink autosave extension
|
||||||
|
*.autosave
|
||||||
|
|
||||||
|
# Octave session info
|
||||||
|
octave-workspace
|
||||||
|
|
||||||
|
# Custom
|
||||||
|
stewart_displacement_grt_rtw/
|
||||||
|
@ -1,18 +1,7 @@
|
|||||||
function J = getJacobianMatrix(RM,M_pos_base)
|
function J = getJacobianMatrix(RM,M_pos_base)
|
||||||
|
% RM: [3x6] unit vector of each leg in the fixed frame
|
||||||
|
% M_pos_base: [3x6] vector of the leg connection at the top platform location in the fixed frame
|
||||||
J = zeros(6);
|
J = zeros(6);
|
||||||
|
J(:, 1:3) = RM';
|
||||||
J(:, 1:3) = RM;
|
J(:, 4:6) = cross(M_pos_base, RM)';
|
||||||
for i = 1:6
|
|
||||||
J(i, 4:6) = -RM(i, :)*getCrossProductMatrix(M_pos_base(i, :));
|
|
||||||
end
|
|
||||||
|
|
||||||
function M = getCrossProductMatrix(v)
|
|
||||||
M = zeros(3);
|
|
||||||
M(1, 2) = -v(3);
|
|
||||||
M(1, 3) = v(2);
|
|
||||||
M(2, 3) = -v(1);
|
|
||||||
M(2, 1) = -M(1, 2);
|
|
||||||
M(3, 1) = -M(1, 3);
|
|
||||||
M(3, 2) = -M(2, 3);
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user