g2o相关问题cs.h,以及no matching function for call to ‘g2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(Block*&)
1.对于cs.h找不到的情况
1)编译的时候一定要把csparse在EXTERNAL文件中,编译进去。
2)修改CMakeLists.txt文件中的include_directories中的${CPARSE_INCLUDE_DIR},在DIR后面不能加上S。
2.编译报错,如下
error: no matching function for call to ‘g2o::BlockSolver<g2o::BlockSolverTraits<6, 3> >::BlockSolver(std::remove_reference<g2o::LinearSolver<Eigen::Matrix<double, 6, 6, 0> >*&>::type)’
std::unique_ptr<Block> solver_ptr (new Block ( std::move(linearSolver )));
参考http://www.cnblogs.com/xueyuanaichiyu/p/7921382.html,应该把响应内容更改为
typedef g2o::BlockSolver< g2o::BlockSolverTraits<,> > Block; // pose 维度为 6, landmark 维度为 3
Block::LinearSolverType* linearSolver = new g2o::LinearSolverCSparse<Block::PoseMatrixType>(); // 线性方程求解器
Block* solver_ptr = new Block ( std::unique_ptr<Block::LinearSolverType>(linearSolver )); // 矩阵块求解器
g2o::OptimizationAlgorithmLevenberg* solver = new g2o::OptimizationAlgorithmLevenberg ( std::unique_ptr<Block>(solver_ptr ));
g2o::SparseOptimizer optimizer;
optimizer.setAlgorithm ( solver );
g2o相关问题cs.h,以及no matching function for call to ‘g2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(Block*&)的更多相关文章
- C++异常:no matching function for call to "Matrix(Matrix&)"
C++异常:no matching function for call to "Matrix(Matrix&)" 我定义了一个类叫Matrix,其中构造函数explicit ...
- error: no matching function for call to 'std::exception:exception(const char[16])'
环境:codeblocks 语言:C++ 在执行:throw new exception("queue is empty.");时 遇到问题:error: no matching ...
- 【ERROR】no matching function for call to 'std::basic_ifstream<char>::basic_ifstream
错误记录:QT中使用 no matching function for call to 'std::basic_ifstream<char>::basic_ifstream(QString ...
- Error no matching function for call to 'std::exception::exception(const char [15])'
Error no matching function for call to 'std::exception::exception(const char [15])' Error 'logic_err ...
- Qt error ------ no matching function for call to QObject::connect(QSpinBox*&, <unresolved overloaded function type>, QSlider*&, void (QAbstractSlider::*)(int))
connect(ui->spinBox_luminosity,&QSpinBox::valueChanged, ui->horizontalSlider_luminosity, & ...
- no matching function for call to 'make_pair(std::string&, size_t&)'
rtl->push_back(make_pair<string, int>(str, pos)); 在redhat6上编译无问题,在centos7上编译出现错误: no matchi ...
- BUG-jQuery提交表单submit方法-TypeError: e[h] is not a function
问题:button按钮设置id为submit后,表单jquery.submit()无法提交,报告异常TypeError: e[h] is not a function 源码: 解决:参考http:// ...
- boost::bind 不能处理函数重载 (error: no matching function for call to 'bind')
前言 最近任务多.工期紧,没有时间更新博客,就水一期吧.虽然是水,也不能太失水准,刚好最近工作中遇到一个 boost::bind 的问题,花费了半天时间来定位解决,就说说它吧. 问题背景 项目中使用了 ...
- no matching function transform?
http://stackoverflow.com/questions/19876746/stdtolower-and-visual-studio-2013 http://forums.codeguru ...
随机推荐
- sqlmap自动注入
基于python2.7开发 git clone https://github.com/sqlmapproject/sqlmap.git sqlmap-dev
- 添加setuptools脚本
#!/usr/bin/env python """Setuptools bootstrapping installer. Maintained at https://gi ...
- Pandas文本操作之读取操作
读写文本格式的数据 pandas中的解析函数 函数 说明 read_csv 从文件.url.文件型对象中加载带分隔符的数据,默认分隔符为逗号 read_table 从文件.url.文件型对象中加载带分 ...
- dbcp第一次获取连接的时间问题
最近优化代码,发现第一次调用数据库连接时非常慢,往后便不再发生.经了解,数据库连接是用dbcp管理的,想在网上查找答案,但没有找到.在某人的提醒下决定研究源代码: 部分源代码如下(BasicDataS ...
- 区间dp 51nod1021
题目链接:https://www.51nod.com/Challenge/ProblemSubmitDetail.html#!#judgeId=673021 代码: 参考博客:https://blog ...
- 二分图 最小点覆盖 poj 3041
题目链接:Asteroids - POJ 3041 - Virtual Judge https://vjudge.net/problem/POJ-3041 第一行输入一个n和一个m表示在n*n的网格 ...
- oracle视图(转)
视图的概念 视图是基于一张表或多张表或另外一个视图的逻辑表.视图不同于表,视图本身不包含任何数据.表是实际独立存在的实体,是用于存储数据的基本结构.而视图只是一种定义,对应一个查询语句.视图的数据 ...
- #define宏重定义
#define A 1 在同一个工程的另外一个文件里又定义了#define A 2 并不会报错(2010vs) 亲测可用 但是最后该宏变量A的值 ,应该是预处理-----顺序处理------最后一个运 ...
- xadmin系列之启动、注册、分发
a.启动首先要加载settings中定义的INSTALLED_APPS列表中的app b.我们进入xadmin的XadminConfig文件 from django.apps import AppCo ...
- JS 获取屏幕的宽度和高度,各种方式
Javascript: 网页可见区域宽: document.body.clientWidth网页可见区域高: document.body.clientHeight网页可见区域宽: document ...