function [MTr] = computeSampleError(WTm, WTr)
% computeSampleError -
%
% Syntax: [MTr] = computeSampleError(WTm, WTr)
%
% Inputs:
%    - WTm - Homoegeneous transformation that represent the
%            wanted pose of the sample with respect to the granite
%    - WTr - Homoegeneous transformation that represent the
%            measured pose of the sample with respect to the granite
%
% Outputs:
%    - MTr - Homoegeneous transformation that represent the
%            wanted pose of the sample expressed in a frame
%            attached to the top platform of the nano-hexapod

MTr = zeros(4,4);

MTr = [WTm(1:3,1:3)', -WTm(1:3,1:3)'*WTm(1:3,4) ; 0 0 0 1]*WTr;
end
