Made Freenect dependency optional

fixed some toro3d warnings

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1327 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2014-06-04 20:24:54 +00:00
parent 0d437d22d7
commit bb5e5c0084
10 changed files with 110 additions and 27 deletions

View File

@@ -2708,6 +2708,18 @@ void PreferencesDialog::testOdometry(OdomType type)
this->getSourceOpenniLocalTransform());
if(!_odomCameraFreenect->init())
{
if(!_odomCameraFreenect->available())
{
QMessageBox::warning(this,
tr("RTAB-Map"),
tr("Freenect camera unavailable! RTAB-Map is not built with Freenect support (libfreenect)."));
}
else
{
QMessageBox::warning(this,
tr("RTAB-Map"),
tr("Freenect camera initialization failed!"));
}
delete _odomCameraFreenect;
_odomCameraFreenect = 0;
}
@@ -2720,6 +2732,9 @@ void PreferencesDialog::testOdometry(OdomType type)
this->getSourceOpenniLocalTransform());
if(!_odomCameraOpenNI->init())
{
QMessageBox::warning(this,
tr("RTAB-Map"),
tr("OpenNI camera initialization failed!"));
delete _odomCameraOpenNI;
_odomCameraOpenNI = 0;
}
@@ -2787,10 +2802,6 @@ void PreferencesDialog::testOdometry(OdomType type)
_odomCameraOpenNI->start();
}
}
else
{
QMessageBox::warning(this, "Initialization failed!", tr("RGB-D camera initialization failed!"));
}
}
void PreferencesDialog::cleanOdometryTest()