当前位置:网站首页>ceres-solver和g2o性能比较
ceres-solver和g2o性能比较
2022-07-07 01:53:00 【chennuo0125-HIT】
前言
ceres-solver 和 g2o 是slam领域常见的优化器,其中ceres-solver被vins-mono使用,而g2o被orb-slam3使用,因此到底哪个优化器更适合于在slam算法开发中使用?
测试
分别基于这两种优化器实现BA过程,然后针对同一个仿真数据集进行测试,测试程序链接: https://github.com/chennuo0125-HIT/test/tree/main/ceres_g2o_comparer,按readme进行编译运行可得如下结果:
************** solve ba by g2o ***************
# Using EigenSparseCholesky poseDim 6 landMarkDim 3 blockordering 1
Performing full BA:
iteration= 0 chi2= 238086189.574891 time= 0.00782969 cumTime= 0.00782969 edges= 9135 schur= 1 lambda= 5991.771138 levenbergIter= 1
iteration= 1 chi2= 12982651.993440 time= 0.00342487 cumTime= 0.0112546 edges= 9135 schur= 1 lambda= 1997.257046 levenbergIter= 1
iteration= 2 chi2= 657425.312444 time= 0.00318212 cumTime= 0.0144367 edges= 9135 schur= 1 lambda= 665.752349 levenbergIter= 1
iteration= 3 chi2= 124163.255742 time= 0.00287256 cumTime= 0.0173092 edges= 9135 schur= 1 lambda= 221.917450 levenbergIter= 1
iteration= 4 chi2= 75275.286988 time= 0.00304911 cumTime= 0.0203584 edges= 9135 schur= 1 lambda= 73.972483 levenbergIter= 1
iteration= 5 chi2= 34439.999175 time= 0.00264852 cumTime= 0.0230069 edges= 9135 schur= 1 lambda= 24.657494 levenbergIter= 1
iteration= 6 chi2= 22057.399494 time= 0.00309912 cumTime= 0.026106 edges= 9135 schur= 1 lambda= 16.438330 levenbergIter= 1
iteration= 7 chi2= 18344.890824 time= 0.00295518 cumTime= 0.0290612 edges= 9135 schur= 1 lambda= 5.479443 levenbergIter= 1
iteration= 8 chi2= 17868.574026 time= 0.00397518 cumTime= 0.0330364 edges= 9135 schur= 1 lambda= 7.305924 levenbergIter= 2
iteration= 9 chi2= 17333.014982 time= 0.00399876 cumTime= 0.0370351 edges= 9135 schur= 1 lambda= 9.741232 levenbergIter= 2
point error before optimize: 2.96158
point error after optimize: 0.462318
************** solve ba by ceres **************
Solver Summary (v 2.0.0-eigen-(3.3.7)-lapack-suitesparse-(5.7.1)-cxsparse-(3.2.0)-eigensparse-no_openmp)
Original Reduced
Parameter blocks 708 706
Parameters 2184 2170
Effective parameters 2169 2157
Residual blocks 9135 9135
Residuals 18270 18270
Minimizer TRUST_REGION
Sparse linear algebra library SUITE_SPARSE
Trust region strategy LEVENBERG_MARQUARDT
Given Used
Linear solver SPARSE_SCHUR SPARSE_SCHUR
Threads 1 1
Linear solver ordering AUTOMATIC 693,13
Schur structure 2,3,6 2,3,6
Cost:
Initial 1.217168e+09
Final 7.973251e+03
Change 1.217160e+09
Minimizer iterations 7
Successful steps 7
Unsuccessful steps 0
Time (in seconds):
Preprocessor 0.005044
Residual only evaluation 0.004244 (7)
Jacobian & residual evaluation 0.010863 (7)
Linear solver 0.034270 (7)
Minimizer 0.053454
Postprocessor 0.000078
Total 0.058576
Termination: CONVERGENCE (Function tolerance reached. |cost_change|/cost: 4.362464e-08 <= 1.000000e-06)
point error before optimize: 2.96158
point error after optimize: 0.0354349
************** cost time **************
g2o cost time: 68.4571 [ms]
ceres cost time: 63.1568 [ms]
结论
基于"说明"中的仿真数据集,可以初步确定ceres-solver在优化精度和耗时方面都优于g2o.
说明
- 测试程序中的仿真数据来源于 g2o 中的 ba_demo.cpp,g2o测试用例也是基于该程序改的。
- 该测试用例只使用了一组仿真数据集,不足以获得较全面的结论,如果大家有好的测试用例或者别的结论,可以保持交流,我的邮箱: [email protected]
边栏推荐
- When we talk about immutable infrastructure, what are we talking about
- 一段程序让你明白什么静态内部类,局部内部类,匿名内部类
- ICML 2022 | 探索语言模型的最佳架构和训练方法
- Ant manor safety helmet 7.8 ant manor answer
- Swagger3 configuration
- Jmeter自带函数不够用?不如自己动手开发一个
- 为不同类型设备构建应用的三大更新 | 2022 I/O 重点回顾
- Introduction to the extension implementation of SAP Spartacus checkout process
- 力扣62 不同路径(从矩阵左上到右下的所有路径数量) (动态规划)
- 安装VMmare时候提示hyper-v / device defender 侧通道安全性
猜你喜欢

Jinfo of JVM command: view and modify JVM configuration parameters in real time

JVM monitoring and diagnostic tools - command line

The solution of a simple algebraic problem

Open the blue screen after VMware installation

matlab / ENVI 主成分分析实现及结果分析

基于ADAU1452的DSP及DAC音频失真分析
![[SOC FPGA] custom IP PWM breathing lamp](/img/4b/5053137cf95e851ca89057e9b9c15c.jpg)
[SOC FPGA] custom IP PWM breathing lamp

进程间通信之共享内存

当我们谈论不可变基础设施时,我们在谈论什么

tkinter窗口选择pcd文件并显示点云(open3d)
随机推荐
港科大&MSRA新研究:关于图像到图像转换,Fine-tuning is all you need
The solution of a simple algebraic problem
【GNN】图解GNN: A gentle introduction(含视频)
Subghz, lorawan, Nb IOT, Internet of things
外设驱动库开发笔记43:GPIO模拟SPI驱动
@Detailed differences between pathvariable and @requestparam
基于ADAU1452的DSP及DAC音频失真分析
JMeter function assistant - random value, random string, fixed value random extraction
laravel 使用腾讯云 COS5全教程
Peripheral driver library development notes 43: GPIO simulation SPI driver
「解析」FocalLoss 解决数据不平衡问题
测试开发基础,教你做一个完整功能的Web平台之环境准备
You don't know the complete collection of recruitment slang of Internet companies
安装VMmare时候提示hyper-v / device defender 侧通道安全性
谷歌 Chrome 浏览器发布 103.0.5060.114 补丁修复 0-day 漏洞
博士申请 | 上海交通大学自然科学研究院洪亮教授招收深度学习方向博士生
JVM command - jmap: export memory image file & memory usage
693. 行程排序
The boss always asks me about my progress. Don't you trust me? (what do you think)
那些自损八百的甲方要求