2017-01-16 18:06:15 +00:00
|
|
|
%*** CHAPTER 3: RIGID-BODY MOTIONS ***
|
|
|
|
|
|
|
|
|
|
function se3mat = VecTose3(V)
|
|
|
|
|
% Takes a 6-vector (representing a spatial velocity).
|
|
|
|
|
% Returns the corresponding 4x4 se(3) matrix.
|
|
|
|
|
% Example Input:
|
|
|
|
|
%{
|
2018-04-30 15:42:43 +00:00
|
|
|
clear; clc;
|
2017-01-16 18:06:15 +00:00
|
|
|
V = [1; 2; 3; 4; 5; 6];
|
|
|
|
|
se3mat = VecTose3(V)
|
|
|
|
|
%}
|
|
|
|
|
% Output:
|
|
|
|
|
% se3mat =
|
|
|
|
|
% 0 -3 2 4
|
|
|
|
|
% 3 0 -1 5
|
|
|
|
|
% -2 1 0 6
|
|
|
|
|
% 0 0 0 0
|
|
|
|
|
|
2018-04-30 15:42:43 +00:00
|
|
|
se3mat = [VecToso3(V(1: 3)), V(4: 6); 0, 0, 0, 0];
|
2017-01-16 18:06:15 +00:00
|
|
|
end
|