加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
calcPoseError.m 687 Bytes
一键复制 编辑 原始数据 按行查看 历史
jacky 提交于 2020-07-09 21:12 . a
function err = calcPoseError( resPose, gtPose )
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%calcPoseError
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Huijun Di
%2020.7.3
%Jacky Lin
%2020.7.9
%每个时刻的位移误差和旋转角度误差
%resPose: 调整参数后的误差
%gtPose: 原数据
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if size(resPose, 1) < 4
resPose(4, 1:4) = [0 0 0 1];
end
if size(gtPose, 1) < 4
gtPose(4, 1:4) = [0 0 0 1];
end
errPose = inv(resPose)*gtPose;
d = 0.5*(errPose(1,1)+errPose(2,2)+errPose(3,3)-1.0);
err(1) = acos(max(min(d,1.0),-1.0))/pi*180;
err(2) = sqrt(sum(errPose(1:3, 4).^2));
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化