Refactoring of Export/View actions:

Added ExportCloudsDialog class for convenience when Viewing or Exporting clouds/meshes
Added Export grid map action
Clouds shown in the 3D Map view can be directly saved without cloud regeneration.

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1621 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2014-07-29 00:52:35 +00:00
parent 0a385ed75f
commit 51b5a91c6a
11 changed files with 937 additions and 858 deletions

View File

@@ -0,0 +1,342 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ExportCloudsDialog</class>
<widget class="QDialog" name="ExportCloudsDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>678</width>
<height>550</height>
</rect>
</property>
<property name="windowTitle">
<string>Export 3D clouds</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="groupBox_regenerate">
<property name="title">
<string>Regenerate clouds</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_voxelSize">
<property name="suffix">
<string> m</string>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<property name="value">
<double>0.005000000000000</double>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_107">
<property name="text">
<string>3D cloud voxel size.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QSpinBox" name="spinBox_decimation">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>32</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_108">
<property name="text">
<string>3D cloud decimation (1-2-4-8-...).</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_maxDepth">
<property name="suffix">
<string> m</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="maximum">
<double>100.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>4.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_132">
<property name="text">
<string>3D cloud maximum depth (0 means no limit).</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_assemble">
<property name="title">
<string>Assemble clouds to a single output cloud</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<layout class="QFormLayout" name="formLayout_3">
<item row="0" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_voxelSize_assembled">
<property name="suffix">
<string> m</string>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<property name="value">
<double>0.005000000000000</double>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_109">
<property name="text">
<string>Voxel size.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_mls">
<property name="title">
<string>Mesh smoothing using Moving Least Squares algorithm (MLS)</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>WARNING: This adds significative time to process, though the clouds will be more smooth.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QFormLayout" name="formLayout_4">
<item row="0" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_mlsRadius">
<property name="suffix">
<string> m</string>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<property name="value">
<double>0.040000000000000</double>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_87">
<property name="text">
<string>MLS search radius: Set the sphere radius that is to be used for determining the k-nearest neighbors used for fitting.
Guidelines: 4 times the voxel size, 0.025 for voxel=0.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_gp3">
<property name="title">
<string>Meshing using Greedy Projection Triangulation algorithm (GP3)</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QSpinBox" name="spinBox_normalKSearch">
<property name="minimum">
<number>0</number>
</property>
<property name="value">
<number>20</number>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_71">
<property name="text">
<string>Set the number of k nearest neighbors to use for the normal estimation to create the mesh. Not used when mesh smoothing (MLS) above is used.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_gp3Radius">
<property name="suffix">
<string> m</string>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<property name="value">
<double>0.040000000000000</double>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_168">
<property name="text">
<string>Sphere radius that is to be used for determining the k-nearest neighbors used for triangulating (GP3).
Guidelines: 4 times the voxel size, 0.025 for voxel=0.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>ExportCloudsDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>ExportCloudsDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@@ -35,7 +35,7 @@
<string>File</string>
</property>
<addaction name="actionSave_point_cloud"/>
<addaction name="actionSave_mesh_ply_vtk_stl"/>
<addaction name="actionExport_2D_Grid_map_bmp_png"/>
<addaction name="separator"/>
<addaction name="actionExit"/>
</widget>
@@ -63,7 +63,6 @@
<addaction name="actionData_recorder"/>
<addaction name="separator"/>
<addaction name="actionView_high_res_point_cloud"/>
<addaction name="actionView_point_cloud_as_mesh"/>
</widget>
<widget class="QMenu" name="menu6">
<property name="title">
@@ -918,7 +917,7 @@
</action>
<action name="actionSave_point_cloud">
<property name="text">
<string>Export point clouds (*.pcd *.ply *.vtk)...</string>
<string>Export 3D clouds (*.pcd *.ply)...</string>
</property>
</action>
<action name="actionDownload_all_clouds">
@@ -964,17 +963,7 @@
</action>
<action name="actionView_high_res_point_cloud">
<property name="text">
<string>View high-res point clouds</string>
</property>
</action>
<action name="actionView_point_cloud_as_mesh">
<property name="text">
<string>View meshes</string>
</property>
</action>
<action name="actionSave_mesh_ply_vtk_stl">
<property name="text">
<string>Export meshes (*.ply *.vtk)...</string>
<string>View high-res point clouds...</string>
</property>
</action>
<action name="actionTrigger_a_new_map">
@@ -1050,6 +1039,11 @@
<string>Data recorder...</string>
</property>
</action>
<action name="actionExport_2D_Grid_map_bmp_png">
<property name="text">
<string>Export 2D grid map (*.bmp *.png)...</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>

View File

@@ -63,9 +63,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-617</y>
<width>732</width>
<height>1198</height>
<y>-185</y>
<width>737</width>
<height>893</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
@@ -86,7 +86,7 @@
<enum>QFrame::Raised</enum>
</property>
<property name="currentIndex">
<number>3</number>
<number>1</number>
</property>
<widget class="QWidget" name="page_22">
<layout class="QVBoxLayout" name="verticalLayout_29">
@@ -418,8 +418,18 @@ Show a yellow background when the number of odometry inliers goes under this thr
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,0,0,1">
<item row="3" column="3">
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,0,1">
<item row="9" column="0">
<widget class="QSpinBox" name="spinBox_ptsize_scan">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>64</number>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="label_108">
<property name="text">
<string>3D cloud decimation (1-2-4-8-...).</string>
@@ -455,20 +465,6 @@ Show a yellow background when the number of odometry inliers goes under this thr
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_159">
<property name="text">
<string>Exporting/
High-res view</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="checkBox_showClouds">
<property name="text">
@@ -490,16 +486,6 @@ High-res view</string>
</widget>
</item>
<item row="1" column="2">
<widget class="QCheckBox" name="checkBox_showSaveClouds">
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label_119">
<property name="text">
<string>Show 3D clouds.</string>
@@ -548,25 +534,6 @@ High-res view</string>
</widget>
</item>
<item row="2" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBox_voxelSize_save">
<property name="suffix">
<string> m</string>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<property name="value">
<double>0.005000000000000</double>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QLabel" name="label_107">
<property name="text">
<string>3D cloud voxel size.</string>
@@ -602,19 +569,6 @@ High-res view</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QSpinBox" name="spinBox_decimation_save">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>32</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_maxDepth">
<property name="suffix">
@@ -654,25 +608,6 @@ High-res view</string>
</widget>
</item>
<item row="4" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBox_maxDepth_save">
<property name="suffix">
<string> m</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="maximum">
<double>100.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>4.000000000000000</double>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QLabel" name="label_132">
<property name="text">
<string>3D cloud maximum depth (0 means no limit).</string>
@@ -720,7 +655,7 @@ High-res view</string>
</property>
</widget>
</item>
<item row="5" column="3">
<item row="5" column="2">
<widget class="QLabel" name="label_155">
<property name="text">
<string>3D cloud opacity.</string>
@@ -750,7 +685,7 @@ High-res view</string>
</property>
</widget>
</item>
<item row="6" column="3">
<item row="6" column="2">
<widget class="QLabel" name="label_157">
<property name="text">
<string>3D cloud point size (1..64).</string>
@@ -781,16 +716,6 @@ High-res view</string>
</widget>
</item>
<item row="7" column="2">
<widget class="QCheckBox" name="checkBox_showSaveScans">
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="3">
<widget class="QLabel" name="label_110">
<property name="text">
<string>Show 2D scans.</string>
@@ -845,7 +770,7 @@ High-res view</string>
</property>
</widget>
</item>
<item row="8" column="3">
<item row="8" column="2">
<widget class="QLabel" name="label_156">
<property name="text">
<string>2D scan opacity.</string>
@@ -855,16 +780,6 @@ High-res view</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QSpinBox" name="spinBox_ptsize_scan">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>64</number>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QSpinBox" name="spinBox_ptsize_odom_scan">
<property name="minimum">
@@ -875,7 +790,7 @@ High-res view</string>
</property>
</widget>
</item>
<item row="9" column="3">
<item row="9" column="2">
<widget class="QLabel" name="label_158">
<property name="text">
<string>2D scan point size (1..64).</string>
@@ -885,7 +800,7 @@ High-res view</string>
</property>
</widget>
</item>
<item row="12" column="3">
<item row="12" column="2">
<widget class="QLabel" name="label_168">
<property name="text">
<string>Sphere radius that is to be used for determining the k-nearest neighbors used for triangulating (GP3). Guidelines: 4 times the voxel size, 0.025 for voxel=0.</string>
@@ -895,7 +810,7 @@ High-res view</string>
</property>
</widget>
</item>
<item row="14" column="3">
<item row="14" column="2">
<widget class="QLabel" name="label_85">
<property name="text">
<string>Mesh smoothing using Moving Least Squares algorithm (MLS).</string>
@@ -924,25 +839,6 @@ High-res view</string>
</property>
</widget>
</item>
<item row="12" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBox_gp3Radius_save">
<property name="suffix">
<string> m</string>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<property name="value">
<double>0.040000000000000</double>
</property>
</widget>
</item>
<item row="15" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_mlsRadius">
<property name="suffix">
@@ -962,7 +858,7 @@ High-res view</string>
</property>
</widget>
</item>
<item row="10" column="3">
<item row="10" column="2">
<widget class="QLabel" name="label_169">
<property name="text">
<string>Online meshing using Greedy Projection Triangulation (GP3).</string>
@@ -972,7 +868,7 @@ High-res view</string>
</property>
</widget>
</item>
<item row="15" column="3">
<item row="15" column="2">
<widget class="QLabel" name="label_87">
<property name="text">
<string>MLS search radius: Set the sphere radius that is to be used for determining the k-nearest neighbors used for fitting. Guidelines: 4 times the voxel size, 0.025 for voxel=0.</string>
@@ -992,7 +888,7 @@ High-res view</string>
</property>
</widget>
</item>
<item row="11" column="3">
<item row="11" column="2">
<widget class="QLabel" name="label_71">
<property name="text">
<string>Set the number of k nearest neighbors to use for the normal estimation to create the mesh. Not used when mesh smoothing below is used.</string>
@@ -1009,35 +905,6 @@ High-res view</string>
</property>
</widget>
</item>
<item row="11" column="2">
<widget class="QSpinBox" name="spinBox_normalKSearch_save">
<property name="minimum">
<number>0</number>
</property>
<property name="value">
<number>20</number>
</property>
</widget>
</item>
<item row="15" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBox_mlsRadius_save">
<property name="suffix">
<string> m</string>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<property name="value">
<double>0.040000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>