2018-07-23 21:47:50 +00:00
|
|
|
function judge = TestIfSE3(mat)
|
|
|
|
|
% *** CHAPTER 3: RIGID-BODY MOTIONS ***
|
|
|
|
|
% Takes mat: A 4x4 matrix.
|
|
|
|
|
% Check if mat is close to or on the manifold SE(3).
|
2018-07-23 08:17:51 +00:00
|
|
|
% Example Inputs:
|
2018-07-23 21:47:50 +00:00
|
|
|
%
|
|
|
|
|
% clear; clc;
|
|
|
|
|
% mat = [1.0, 0.0, 0.0, 1.2;
|
|
|
|
|
% 0.0, 0.1, -0.95, 1.5;
|
|
|
|
|
% 0.0, 1.0, 0.1, -0.9;
|
|
|
|
|
% 0.0, 0.0, 0.1, 0.98];
|
|
|
|
|
% judge = TestIfSE3(mat)
|
|
|
|
|
%
|
2018-07-23 08:17:51 +00:00
|
|
|
% Output:
|
2018-07-23 21:47:50 +00:00
|
|
|
% judge =
|
2018-07-23 08:17:51 +00:00
|
|
|
% 0
|
|
|
|
|
|
2018-07-23 21:47:50 +00:00
|
|
|
judge = norm(DistanceToSE3(mat)) < 1e-3;
|
2018-07-23 08:17:51 +00:00
|
|
|
end
|