mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 10:00:23 +08:00
Fixed g2o version not correctly used, D400: set default to IR+Depth
This commit is contained in:
@@ -153,7 +153,7 @@ OptimizerG2O::OptimizerG2O(const ParametersMap & parameters) :
|
|||||||
// Issue on android, have to explicitly register this type when using fixed root prior below
|
// Issue on android, have to explicitly register this type when using fixed root prior below
|
||||||
if(!g2o::Factory::instance()->knowsTag("CACHE_SE3_OFFSET"))
|
if(!g2o::Factory::instance()->knowsTag("CACHE_SE3_OFFSET"))
|
||||||
{
|
{
|
||||||
#if defined(RTABMAP_G2O_CPP11) and RTABMAP_G2O_CPP11 == 1
|
#if defined(RTABMAP_G2O_CPP11) && RTABMAP_G2O_CPP11 == 1
|
||||||
g2o::Factory::instance()->registerType("CACHE_SE3_OFFSET", g2o::make_unique<g2o::HyperGraphElementCreator<g2o::CacheSE3Offset> >());
|
g2o::Factory::instance()->registerType("CACHE_SE3_OFFSET", g2o::make_unique<g2o::HyperGraphElementCreator<g2o::CacheSE3Offset> >());
|
||||||
#else
|
#else
|
||||||
g2o::Factory::instance()->registerType("CACHE_SE3_OFFSET", new g2o::HyperGraphElementCreator<g2o::CacheSE3Offset>);
|
g2o::Factory::instance()->registerType("CACHE_SE3_OFFSET", new g2o::HyperGraphElementCreator<g2o::CacheSE3Offset>);
|
||||||
@@ -1414,7 +1414,7 @@ std::map<int, Transform> OptimizerG2O::optimizeBA(
|
|||||||
{
|
{
|
||||||
g2o::SparseOptimizer optimizer;
|
g2o::SparseOptimizer optimizer;
|
||||||
//optimizer.setVerbose(ULogger::level()==ULogger::kDebug);
|
//optimizer.setVerbose(ULogger::level()==ULogger::kDebug);
|
||||||
#if defined(RTABMAP_G2O_CPP11) and not defined(RTABMAP_ORB_SLAM)
|
#if defined(RTABMAP_G2O_CPP11) && !defined(RTABMAP_ORB_SLAM)
|
||||||
std::unique_ptr<g2o::BlockSolver_6_3::LinearSolverType> linearSolver;
|
std::unique_ptr<g2o::BlockSolver_6_3::LinearSolverType> linearSolver;
|
||||||
#else
|
#else
|
||||||
g2o::BlockSolver_6_3::LinearSolverType * linearSolver = 0;
|
g2o::BlockSolver_6_3::LinearSolverType * linearSolver = 0;
|
||||||
@@ -1478,7 +1478,7 @@ std::map<int, Transform> OptimizerG2O::optimizeBA(
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if defined(RTABMAP_G2O_CPP11) and not defined(RTABMAP_ORB_SLAM)
|
#if defined(RTABMAP_G2O_CPP11) && !defined(RTABMAP_ORB_SLAM)
|
||||||
optimizer.setAlgorithm(new g2o::OptimizationAlgorithmLevenberg(
|
optimizer.setAlgorithm(new g2o::OptimizationAlgorithmLevenberg(
|
||||||
g2o::make_unique<g2o::BlockSolver_6_3>(std::move(linearSolver))));
|
g2o::make_unique<g2o::BlockSolver_6_3>(std::move(linearSolver))));
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -3921,12 +3921,16 @@ void PreferencesDialog::selectSourceDriver(Src src, int variant)
|
|||||||
_ui->spinBox_rs2_width->setValue(1280);
|
_ui->spinBox_rs2_width->setValue(1280);
|
||||||
_ui->spinBox_rs2_height->setValue(720);
|
_ui->spinBox_rs2_height->setValue(720);
|
||||||
_ui->spinBox_rs2_rate->setValue(30);
|
_ui->spinBox_rs2_rate->setValue(30);
|
||||||
|
_ui->checkbox_rs2_irMode->setChecked(false);
|
||||||
|
_ui->checkbox_rs2_emitter->setChecked(true);
|
||||||
}
|
}
|
||||||
else
|
else // D400
|
||||||
{
|
{
|
||||||
_ui->spinBox_rs2_width->setValue(848);
|
_ui->spinBox_rs2_width->setValue(848);
|
||||||
_ui->spinBox_rs2_height->setValue(480);
|
_ui->spinBox_rs2_height->setValue(480);
|
||||||
_ui->spinBox_rs2_rate->setValue(60);
|
_ui->spinBox_rs2_rate->setValue(60);
|
||||||
|
_ui->checkbox_rs2_irMode->setChecked(true);
|
||||||
|
_ui->checkbox_rs2_emitter->setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user