Cartographer-[4]-从node_main.cc开始

1. 从node_main.cc开始

虽说从node_main.cc开始,但是,实际上还是从demo开始吧

2. demo_backpack_2d.launch

官方的demo启动如下:

2D:

1
2
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag
roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${HOME}/Downloads/cartographer_paper_deutsches_museum.bag

Read More

Cartographer-[2]-系统参数配置说明

1. Algorithm walkthrough for tuning

1.1. 两个子系统

第一个是局部 SLAM (有时也称为前端或局部轨迹构建器)。 它的工作是构建一系列子地图。 每个子地图都意味着本地一致性,但我们接受本地 SLAM 随着时间的推移而漂移。

另一个子系统是全局 SLAM (有时称为后端)。 它在后台线程中运行,其主要任务是找到闭环约束。 它通过对子图进行扫描匹配扫描(聚集在节点中)来实现这一点。 它还结合了其他传感器数据,以获得更高层次的看法,并确定最一致的全局解决方案。 在3D 中,它还试图找到重力的方向。

Read More

智能指针-unique_ptr-shared_ptr-make_unique

C++——智能指针简介[From Net]

一、什么是对象所有权?

  在接触智能指针之前首先要理解对象的所有权是什么,在这之前我们总是用newdelete来进行内存的申请与释放,在这种堆内存分配的方式中,要遵守一个很基本的原则——谁创建谁销毁原则,简单地举个例子,类foo构造函数中中通过new申请了一个数组,那么就要在类foo的析构函数中delete这个数组,而对象的所有权指的就是谁负责delete这个对象的关系。

  根据几种智能指针的用途来分,对象的所有权可以分为独占所有权分享所有权弱引用。现在来一一介绍它们:      独占所有权:假设Dad拥有Son独占所有权,那么Son就必须由Daddelete,再从字面上看,独占意味如果有另一个对象OldWang想要持有Son的话,就必须让Dad放弃对Son的所有权,此所谓独占,亦即不可分享。      分享所有权:假设Dad拥有PS4分享所有权,那么由最后一个持有PS4的对象来对其进行delete,也就是说,如果这个时候Son也想要持有PS4Dad不必放弃自己的所有权,而是把所有权分享给Son,而如果Dad被销毁(生命周期结束、被释放等),那PS4就在Son被销毁时被释放,反之如果Son先于Dad被销毁,那么PS4就由Dad来释放。      弱引用:假设AccountThiefAccount弱引用的话,那么AccountThief可以使用Account,但是AccountThief不负责释放Account,如果Account已经被拥有其所有权的对象(比如AccountOwner)释放后,AccountThief还想继续使用Account的时候就会取得一个nullptrnullptr勉强可以当做NULL来看,前者是关键字,后者是宏定义)。

二、什么是智能指针?

Read More

3D-NDT-匹配算法

1. 3D-正态分布变换(The Normal Distributions Transform)

前面探讨过2D-NDT匹配算法的原理和推导以及代码阅读,接下来将这个思想扩展到3D,这个工作可参见如下博士论文:The Three-Dimensional Normal-Distributions Transform— an Efficient Representation for Registration,Surface Analysis, and Loop Detection

该论文中,关于NDT的描述,从第六章开始

2. The normal-distributionstransform

Read More

Question-About-Localization(定位相关问题)

1. Mapping/Localization

1.1. Why does mapping needed in the slam?

In Autoware, localization(ndt_matching) and mapping(ndt_mapping) are completely separate functions. ndt_mapping is a function that create a map in a unknown environment from scratch so you don't need a map. On the other hand, ndt_matching is a localization function within a map so map is needed as a input of the function.

在 Autoware 中,定位(ndt-matching)和建图(ndt-mapping)是完全分离的函数。 Ndt建图是一个在未知环境中从头创建地图的函数。另一方面,ndt-matching是建图中的一个定位函数。

The reason why we need to match the scan and the existing map is, it is faster and more accurate than matching the current scan and the previous scans. Simultaneously localize and mapping using NDT can not be done in real-time so far. If you want to know about NDT algorithm, please refer to the following paper.

Read More