some fixes for CameraFlyCapture2 driver on Windows, fixed OdometryMono with stereo cameras

This commit is contained in:
Mathieu Labbé
2015-07-06 17:25:38 -04:00
parent fce1816c21
commit dc48b4d4f4
11 changed files with 126 additions and 56 deletions

View File

@@ -132,7 +132,10 @@ CloudViewer::CloudViewer(QWidget *parent) :
-1, 0, 0,
0, 0, 0,
0, 0, 1);
#ifndef _WIN32
// Crash on startup on Windows (vtk issue)
_visualizer->addCoordinateSystem(0.2, 0, 0, 0, 0);
#endif
//setup menu/actions
createMenu();

View File

@@ -194,11 +194,11 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
}
if(!CameraStereoDC1394::available())
{
_ui->comboBox_cameraRGBD->setItemData(6, 0, Qt::UserRole - 1);
_ui->comboBox_cameraStereo->setItemData(0, 0, Qt::UserRole - 1);
}
if(!CameraStereoFlyCapture2::available())
{
_ui->comboBox_cameraRGBD->setItemData(7, 0, Qt::UserRole - 1);
_ui->comboBox_cameraStereo->setItemData(1, 0, Qt::UserRole - 1);
}
_ui->openni2_exposure->setEnabled(CameraOpenNI2::exposureGainAvailable());
_ui->openni2_gain->setEnabled(CameraOpenNI2::exposureGainAvailable());
@@ -350,6 +350,9 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
_ui->stackedWidget_rgbd->setCurrentIndex(_ui->comboBox_cameraRGBD->currentIndex());
connect(_ui->comboBox_cameraRGBD, SIGNAL(currentIndexChanged(int)), _ui->stackedWidget_rgbd, SLOT(setCurrentIndex(int)));
connect(_ui->comboBox_cameraRGBD, SIGNAL(currentIndexChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
_ui->stackedWidget_stereo->setCurrentIndex(_ui->comboBox_cameraStereo->currentIndex());
connect(_ui->comboBox_cameraStereo, SIGNAL(currentIndexChanged(int)), _ui->stackedWidget_stereo, SLOT(setCurrentIndex(int)));
connect(_ui->comboBox_cameraStereo, SIGNAL(currentIndexChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
connect(_ui->openni2_autoWhiteBalance, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
connect(_ui->openni2_autoExposure, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
connect(_ui->openni2_exposure, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
@@ -1040,21 +1043,34 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox)
_ui->source_checkBox_useDbStamps->setChecked(false);
#ifdef _WIN32
_ui->comboBox_cameraRGBD->setCurrentIndex(kSrcOpenNI2-kSrcOpenNI_PCL); // openni2
_ui->comboBox_cameraRGBD->setCurrentIndex(kSrcOpenNI2-kSrcRGBD); // openni2
#else
if(CameraFreenect::available())
{
_ui->comboBox_cameraRGBD->setCurrentIndex(kSrcFreenect-kSrcOpenNI_PCL); // freenect
_ui->comboBox_cameraRGBD->setCurrentIndex(kSrcFreenect-kSrcRGBD); // freenect
}
else if(CameraOpenNI2::available())
{
_ui->comboBox_cameraRGBD->setCurrentIndex(kSrcOpenNI2-kSrcOpenNI_PCL); // openni2
_ui->comboBox_cameraRGBD->setCurrentIndex(kSrcOpenNI2-kSrcRGBD); // openni2
}
else
{
_ui->comboBox_cameraRGBD->setCurrentIndex(kSrcOpenNI_PCL-kSrcOpenNI_PCL); // openni-pcl
_ui->comboBox_cameraRGBD->setCurrentIndex(kSrcOpenNI_PCL-kSrcRGBD); // openni-pcl
}
#endif
if(CameraStereoDC1394::available())
{
_ui->comboBox_cameraStereo->setCurrentIndex(kSrcDC1394-kSrcStereo); // dc1394
}
else if(CameraStereoFlyCapture2::available())
{
_ui->comboBox_cameraStereo->setCurrentIndex(kSrcFlyCapture2-kSrcStereo); // flycapture
}
else
{
_ui->comboBox_cameraStereo->setCurrentIndex(kSrcStereoImages-kSrcStereo); // stereo images
}
_ui->checkbox_rgbd_colorOnly->setChecked(false);
_ui->openni2_autoWhiteBalance->setChecked(true);
_ui->openni2_autoExposure->setChecked(true);

View File

@@ -1198,6 +1198,9 @@
</property>
</action>
<action name="actionStereoFlyCapture2">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>FlyCapture2</string>
</property>

View File

@@ -64,8 +64,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>760</width>
<height>1570</height>
<width>759</width>
<height>887</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
@@ -439,7 +439,7 @@ Show a yellow background when the number of odometry inliers goes under this thr
<item row="2" column="1">
<widget class="QLabel" name="label_161">
<property name="text">
<string>Cloud subtraction filtering. When a new cloud is added to the map, the previous cloud is subtracted from the new cloud. Using &quot;Node filtering&quot; at the same time may generate large &quot;holes&quot; in the map (so better to use without &quot;Node filtering&quot;). Voxel size of the map below is used for the radius search of the close points to filter between the two clouds.</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Cloud subtraction filtering. &lt;span style=&quot; font-weight:600;&quot;&gt;Note that Map's &amp;quot;3D cloud voxel size&amp;quot; parameter below should be set&lt;/span&gt;. &lt;br/&gt;When a new cloud is added to the map, the previous cloud is subtracted from the new cloud. Using &amp;quot;Node filtering&amp;quot; at the same time may generate large &amp;quot;holes&amp;quot; in the map (so better to use without &amp;quot;Node filtering&amp;quot;). Voxel size of the map below is used for the radius search of the close points to filter between the two clouds.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>