cartographer 分析
原文链接:http://blog.csdn.net/zyh821351004/article/details/52421005
cartographer与karto的比较
1. 两者采取的都是图优化框架。 采取的优化库不一致, karto采取的是spa(karto_slam)或g2o(nav2d), cartographer采取的是google的ceres构建problem优化。 karto的前端与后端采取的是单线程进行,cartographer按paper说明,采取的是4线程后端优化,还在进一步确定。
2. 运动预测部分:tracker
karto利用的是odom进行初始位置的预测, cartographer部分利用imu构建预测模型,scanmatcher与odom(可选)构建观测模型,采取UKF进行运动预测, cartographer带有tracker的说法。
// Implementation of a Kalman filter. We follow the nomenclature from Thrun, S. et al., Probabilistic Robotics, 2006.
// Extended to handle non-additive noise/sensors inspired by Kraft, E., A // Quaternion-based Unscented Kalman Filter for Orientation Tracking.
3. scanMatcher 部分
3.1 karto 采取的的是real-time correlative scan matcher(三维窗口遍历寻优)的方式进行的。 采取的是双分辨率的低分辨率和高分辨率的两次搜索。
This is an implementation of the algorithm described in "Real-Time Correlative Scan Matching" by Olson.
The correlative scan matching algorithm is exhaustively evaluating the scan matching search space. As described by the paper, the basic steps are:
// 1) Evaluate the probability p(z|xi, m) over the entire 3D search window using the low-resolution table.
// 2) Find the best voxel in the low-resolution 3D space that has not already been considered. Denote this value as Li. If Li < Hbest, terminate: Hbest is
the best scan matching alignment.
// 3) Evaluate the search volume inside voxel i using the high resolution table. Suppose the log-likelihood of this voxel is Hi. Note that Hi <= Li since the
low-resolution map overestimates the log likelihoods. If Hi > Hbest, set Hbest = Hi.
This can be made even faster by transforming the scan exactly once over some discretized range.
3.2 cartoGrapher也是采取的双搜索的方式进行的, 先用一次real-time correlative scan matcher(三维窗口遍历寻优),再构建优化等式,利用ceres优化求解。(栅格概率, T的偏差,R的偏差)
occupied_space_cost_functor_weight TranslationDeltaCostFunctor RotationDeltaCostFunctor
4. submap的说明
4.1 karto没有submap的概念,全部以keyScan的形式存储在sensorManager。 无地图缓存,但每次计算地图有计算消耗。
采取的是scan-map的匹配方式,每次keyScan进入主动的依据pose的距离窗口生成localMap进行匹配。 local 与 gloal的loop closure依据graph的结构和sensorManage顺序存储分配的ID信息,选择候选scans,生成localMap,进行匹配,依据score进一步确定闭环。
4.2 . cartographer采用了submap的概念, 依据一定数量的scan初始一个submap, 依据窗口大小, 插入newScan,更新submap. 有子图缓存,会占用内存。
// An individual submap, which has an initial position 'origin', keeps track of which laser fans where inserted into it, and sets the 'finished_probability_grid' to be used for
loop closing once the map no longer changes.
// Submaps is a sequence of maps to which scans are matched and into which scans are inserted.
// Except during initialization when only a single submap exists, there are
// always two submaps into which scans are inserted: an old submap that is used
// for matching, and a new one, which will be used for matching next, that is
// being initialized.
//
// Once a certain number of scans have been inserted, the new submap is
// considered initialized: the old submap is no longer changed, the "new" submap
// is now the "old" submap and is used for scan-to-map matching. Moreover,
// a "new" submap gets inserted.
5. loopCheck
5.1 karto grapher主要依据pose 和 distance信息创建localMap,scanMatcher(real-time correlative scan matcher)确定。
1) 依据当前的Vertex, 从Graph中找到与之相邻的所有vertex(一定距离范围内).
2) 采取广度优先搜索的方式,将相邻(next)与相连(adjacentVertices)添加进nearLinkedScans.
3) 从sensorManager中取从前到后,依据id序号挑选与当前在一定距离范围内,且不在nearLinkedScans中的candidateScans, 当数量达到一定size,返回。
4)loopScanMatcher进行scanTomap的匹配,当匹配response 和covariance达到一定要求认为闭环检测到。得到调整的correct pose.
5)Add link to loop : 调整边(全局闭环)
6) 触发correctPose: spa优化
5.2 cartogapher 类似((real-time correlative scan matcher)),引入了branch and bound的方式, 加快了闭环的查找。
依据多分辨率多层的树型结构,单枝生长的方式(branch),及时剪枝操作(bound),深度优先搜索确定闭环。 (Intra-submap Inter-submap )
添加相应的闭环约束。构建优化问题,利用ceres优化。
// Current optimization problem.
sparse_pose_graph::OptimizationProblem optimization_problem_;
sparse_pose_graph::ConstraintBuilder constraint_builder_ GUARDED_BY(mutex_);
// This is an implementation of the algorithm described in "Real-Time Correlative Scan Matching" by Olson.
// It is similar to the RealTimeCorrelativeScanMatcher but has a different trade-off: Scan matching is faster because more effort is put into the
// precomputation done for a given map. However, this map is immutable after construction.
[原文:http://blog.csdn.net/zyh821351004/article/details/52421005 ]
安装:
github: https://github.com/googlecartographer/cartographer_ros
安装指导 https://google-cartographer-ros.readthedocs.io/en/latest/
tip: catkin_make_isolate 编译带非ros repo的 =》 可以试试 catkin build 编译
rosbag 数据集出错(bag broke):校验
shasum ~/Downloads/cartographer_paper_deutsches_museum.bag
2a021fadae9deb0643d73c8ca3acb332fcb3baa2
demo_video:
cartographer 3d http://v.qq.com/x/page/n0334yt1tt1.html
cartographer 2d http://v.qq.com/x/page/z03346p134v.html
https://github.com/googlecartographer/cartographer_ros/issues/41 sensor: two Hokuyo UTM-30LX-EW + 3DM GX4 25
地图保存接口(srv): 保存位置:~/.ros/cartographer_tb.pgm
rosservice call /finish_trajectory "stem: 'cartographer_tb'"
最早调试遇到的bug,issue贴的图片。
cartographer 分析的更多相关文章
- Cartographer源码阅读(4):Node和MapBuilder对象2
MapBuilder的成员变量sensor::Collator sensor_collator_; 再次阅读MapBuilder::AddTrajectoryBuilder方法.首先构造了mappin ...
- Cartographer源码阅读(3):程序逻辑结构
Cartographer早期的代码在进行3d制图的时候使用了UKF方法,查看现有的tag版本,可以转到0.1.0和0.2.0查看,包含kalman_filter文件夹. 文件夹中的pose_track ...
- cartographer 3D scan matching 理解
cartographer 3D scan matching没有论文和其它资料,因此尝试通过源码理解其处理方法,理解不当之处还请指正. 目录: 0.2D 匹配方法简介 1.real time corre ...
- cartographer环境建立以及建图测试(详细级)
- linux下定位异常消耗的线程实战分析
前言: 之前分享过一篇Linux开发coredump文件分析实战分享 ,今天再来分享一篇实战文章. 在我们嵌入式linux开发过程中,开发过程中我们经常会使用多进程.多线程开发.那么多线程使用过程中, ...
- perf性能分析工具使用分享
@ 目录 前言 perf的介绍和安装 perf基本使用 perf list使用,可以列出所有的采样事件 perf stat 概览程序的运行情况 perf top实时显示当前系统的性能统计信息 perf ...
- 【cartographer ros】十: 延时和误差分析
上一节介绍了在cartographer进行建图和定位(在线和离线). 本节将分析cartographer运行时的误差与延迟,主要是在线定位时的,并尝试优化解决. 目录 1,误差分析 a,硬件精度 b, ...
- alias导致virtualenv异常的分析和解法
title: alias导致virtualenv异常的分析和解法 toc: true comments: true date: 2016-06-27 23:40:56 tags: [OS X, ZSH ...
- 火焰图分析openresty性能瓶颈
注:本文操作基于CentOS 系统 准备工作 用wget从https://sourceware.org/systemtap/ftp/releases/下载最新版的systemtap.tar.gz压缩包 ...
随机推荐
- 根据指定的key,将二维数组的value转换为string,适用于mysql的in查询
function array_unique_join($arr,$param){ $utm_source_arr = array_unique(array_column($arr,$param)); ...
- MySQL数据库服务器整体规划(思路与步骤)
MySQL数据库服务器整体规划(思路与步骤) 参考资料: http://blog.51cto.com/zhilight/1630611 我们在搭建MySQL数据库服务器的开始阶段就合理的规划,可以避免 ...
- Hadoop生态圈-构建企业级平台安全方案
Hadoop生态圈-构建企业级平台安全方案 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 能看到这篇文章的小伙伴,估计你对大数据集群的部署对于你来说应该是手到擒来了吧.我之前分享过 ...
- HTTP深入理解
HTTP被设计于二十世纪九十年代初期,是一种可扩展的协议, 它是应用层的协议, 通过TCP,或TLS加密的TCP连接来发送, 理论上任何可靠的传输协议都可以使用. 因其良好的扩展性,时至今日,它不仅被 ...
- lasticsearch最佳实践之分片使用优化
一.遇到的问题 与大多数分布式系统一样,Elasticsearch按照一定的Hash规则把用户数据切分成多个分片,然后打散到不同机器进行存储,从而实现大规模数据的分布式存储. cluster.png ...
- 谈谈java程序代码保护及license设计
理论上讲,不存在牢不可破的漏洞,只是时间和成本问题.通常我们认为的不可破解,说的是破解需要难以接受的时间和成本.对于java程序来说,class文件很容易被反编译,所以理论上而言,对java程序做li ...
- Kettle系列: Kettle并行执行Trans后的合并问题
我们在作业开发中为了处理效率, 经常需要并行执行一些trans, 等它们执行完毕后, 需要执行另外一些trans, 从流程上也就是分支+汇合. 粗看起来很简单, Kettle中对接一下这些组件就搞定了 ...
- 新浪某站CRLF Injection导致的安全问题
CRLF攻击的一篇科普:新浪某站CRLF Injection导致的安全问题(转) 转:https://www.leavesongs.com/PENETRATION/Sina-CRLF-Injectio ...
- Linux 文件大小查找排序
du -sh 文件大小查询: 1.当前目录的大小: du -sh | sort 2.当前 目录下的文件大小: ls -lsh 3.当前目录 下的文件大小排序: du -sh * |sort -n 4. ...
- PHP7语法知识(二):流程控制语句、函数、字符串、数组
流程控制: 一.条件控制语句 1.if条件控制语句: 2.switch分支语句: 二.循环控制语句 1.while循环: 2.do while循环: 3.for循环: 4.foreach循环: 三.跳 ...