资源简介
这是YGZ立体惯性SLAM,一种立体惯性VO代码。它专为立体声和立体声惯性传感器模块而设计,如vi-sensor。它使用LK光流作为前端,并使用滑动窗口束调整作为后端。随意在数据集和您自己的传感器中尝试它。高博写的基于LK光流前端的源码,自行添加了ROS节点
代码片段和文件信息
#include “ygz/Feature.h“
#include “ygz/MapPoint.h“
#include “ygz/frame.h“
#include “ygz/BackendSlidingWindowG2O.h“
#include “ygz/Tracker.h“
#include “ygz/ORBMatcher.h“
#include “ygz/Camera.h“
// g2o related
#include “ygz/G2OTypes.h“
#include
#include
#include
#include
#include
namespace ygz {
bool BackendSlidingWindowG2O::IsBusy() {
unique_lock lock(mMutexAccept);
return !mbAcceptKeyframes;
}
void BackendSlidingWindowG2O::MainLoop() {
mbFinished = false;
while (1) {
// Tracking will see that Local Mapping is busy
SetAcceptKeyframes(false);
// Check if there are keyframes in the queue
if (CheckNewKeyframes()) {
// BoW conversion and insertion in Map
mbAbortBA = false;
LOG(INFO) << “Process new KF“ << endl;
ProcessNewKeyframe();
LOG(INFO) << “Process new KF done.“ << endl;
} else if (Stop()) {
// Safe area to stop
while (isStopped() && !CheckFinish()) {
usleep(3000);
}
if (CheckFinish())
break;
}
ResetIfRequested();
// Tracking will see that Local Mapping is busy
SetAcceptKeyframes(true);
if (CheckFinish())
break;
usleep(3000);
}
SetFinish();
}
void BackendSlidingWindowG2O::ProcessNewKeyframe() {
{
unique_lock lock(mMutexNewKFs);
mpCurrent = mpNewKFs.front();
mpNewKFs.pop_front();
}
{
unique_lock lockKF(mMutexKFs);
mpKFs.push_back(mpCurrent);
}
// 将双目匹配出来的,且没有关联地图点的那些点,为它们创建新的地图点
mpCurrent->AssignFeaturesToGrid();
int cntSetGood = 0 cntImmature = 0;
{
unique_lock lockMps(mMutexPoints);
unique_lock lock(mpCurrent->mMutexFeature);
for (size_t i = 0; i < mpCurrent->mFeaturesLeft.size(); i++) {
shared_ptr feat = mpCurrent->mFeaturesLeft[i];
if (feat == nullptr)
continue;
if (feat->mfInvDepth > 0 && feat->mpPoint == nullptr) {
// 距离过近或过远都不可靠
if (feat->mfInvDepth < setting::minNewMapPointInvD ||
feat->mfInvDepth > setting::maxNewMapPointInvD)
continue;
// create a new map point
shared_ptr pNewMP(new MapPoint(mpCurrent i));
pNewMP->AddObservation(mpCurrent i);
feat->mpPoint = pNewMP;
pNewMP->Com
相关资源
- 视觉slam14讲PPT.zip
- ORB_SLAM3.zip
- slam14讲,ch13单目数据集 depthmaps.rar
- slam十四讲第13章 单目稠密重建数据集
- 视觉SLAM十四讲 高清完整.pdf版
- 高翔视觉slam代码
- slambook-master.tar.gz
- 2017年IROS稀疏点SLAM论文集合
- 一起做RGB-D SLAM-半仙居士 pdf
- 激光SLAM性能评估
- TUM的一个SLAM数据集 下
- 高翔视觉SLAM十四讲-完整14讲版.pdf
- 申抒含-基于图像的大规模场景三维重
- 深蓝学院的slam课件PPT.zip
- 视觉SLAM十四讲PPT-高翔亲笔
- Liner Algebra Done Right(中文版)
- ORB-SLAM2源码
- 视觉SLAM十四讲从理论到实践__高翔著
- TUM的一个SLAM数据集 中
- 视觉SLAM 视觉SLAM
- slam算法的论文几篇
- TUM的一个SLAM数据集 上
- slam避障/建图/导航/视觉定位/3Dslam 5篇
- 视觉slam十四讲 高清 pdf
- 视觉SLAM十四讲.zip
- ROS入门中文+ROS入门 第二版中文
- DL+SLAM近两年深度学习结合SLAM的一些研
- 高翔视觉SLAM十四讲-完整14讲版.zip
- My_ORB-SLAM24Windows
- 高翔slam十四讲超清版前10讲.rar
评论
共有 条评论