mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
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:
@@ -2012,10 +2012,19 @@ void MainWindow::startDetection()
|
||||
|
||||
if(!_cameraOpenKinect->init())
|
||||
{
|
||||
ULOGGER_WARN("init CameraOpenKinect failed... ");
|
||||
QMessageBox::warning(this,
|
||||
tr("RTAB-Map"),
|
||||
tr("OpenKinect camera initialization failed..."));
|
||||
ULOGGER_WARN("init CameraFreenect failed... ");
|
||||
if(!_cameraOpenKinect->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!"));
|
||||
}
|
||||
emit stateChanged(kIdle);
|
||||
delete _cameraOpenKinect;
|
||||
_cameraOpenKinect = 0;
|
||||
@@ -2043,7 +2052,7 @@ void MainWindow::startDetection()
|
||||
ULOGGER_WARN("init CameraOpenni failed... ");
|
||||
QMessageBox::warning(this,
|
||||
tr("RTAB-Map"),
|
||||
tr("Openni camera initialization failed..."));
|
||||
tr("Openni camera initialization failed!"));
|
||||
emit stateChanged(kIdle);
|
||||
delete _cameraOpenni;
|
||||
_cameraOpenni = 0;
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user