mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
Added octomap ground is an obstacle option
This commit is contained in:
@@ -154,6 +154,7 @@ public:
|
|||||||
bool isCloudsShown(int index) const; // 0=map, 1=odom
|
bool isCloudsShown(int index) const; // 0=map, 1=odom
|
||||||
bool isOctomapShown() const;
|
bool isOctomapShown() const;
|
||||||
int getOctomapTreeDepth() const;
|
int getOctomapTreeDepth() const;
|
||||||
|
bool isOctomapGroundAnObstacle() const;
|
||||||
int getCloudDecimation(int index) const; // 0=map, 1=odom
|
int getCloudDecimation(int index) const; // 0=map, 1=odom
|
||||||
double getCloudMaxDepth(int index) const; // 0=map, 1=odom
|
double getCloudMaxDepth(int index) const; // 0=map, 1=odom
|
||||||
double getCloudMinDepth(int index) const; // 0=map, 1=odom
|
double getCloudMinDepth(int index) const; // 0=map, 1=odom
|
||||||
|
|||||||
@@ -2646,6 +2646,11 @@ void MainWindow::createAndAddProjectionMap(
|
|||||||
groundCloud = util3d::transformPointCloud(groundCloud, tinv);
|
groundCloud = util3d::transformPointCloud(groundCloud, tinv);
|
||||||
obstaclesCloud = util3d::transformPointCloud(obstaclesCloud, tinv);
|
obstaclesCloud = util3d::transformPointCloud(obstaclesCloud, tinv);
|
||||||
}
|
}
|
||||||
|
if(_preferencesDialog->isOctomapGroundAnObstacle())
|
||||||
|
{
|
||||||
|
*obstaclesCloud += *groundCloud;
|
||||||
|
groundCloud->clear();
|
||||||
|
}
|
||||||
_octomap->addToCache(nodeId, groundCloud, obstaclesCloud);
|
_octomap->addToCache(nodeId, groundCloud, obstaclesCloud);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -159,7 +159,8 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
|||||||
_ui->label_octomap->setEnabled(false);
|
_ui->label_octomap->setEnabled(false);
|
||||||
_ui->spinBox_octomap_treeDepth->setEnabled(false);
|
_ui->spinBox_octomap_treeDepth->setEnabled(false);
|
||||||
_ui->label_octomap_treeDepth->setEnabled(false);
|
_ui->label_octomap_treeDepth->setEnabled(false);
|
||||||
|
_ui->checkBox_octomap_groundObstacle->setEnabled(false);
|
||||||
|
_ui->label_octomap_groundObstacle->setEnabled(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef RTABMAP_NONFREE
|
#ifndef RTABMAP_NONFREE
|
||||||
@@ -390,6 +391,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
|||||||
|
|
||||||
connect(_ui->checkBox_octomap, SIGNAL(clicked(bool)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
connect(_ui->checkBox_octomap, SIGNAL(clicked(bool)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
||||||
connect(_ui->spinBox_octomap_treeDepth, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
connect(_ui->spinBox_octomap_treeDepth, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
||||||
|
connect(_ui->checkBox_octomap_groundObstacle, SIGNAL(clicked(bool)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
||||||
|
|
||||||
connect(_ui->groupBox_organized, SIGNAL(clicked(bool)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
connect(_ui->groupBox_organized, SIGNAL(clicked(bool)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
||||||
connect(_ui->doubleSpinBox_mesh_angleTolerance, SIGNAL(valueChanged(double)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
connect(_ui->doubleSpinBox_mesh_angleTolerance, SIGNAL(valueChanged(double)), this, SLOT(makeObsoleteCloudRenderingPanel()));
|
||||||
@@ -1228,6 +1230,7 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox)
|
|||||||
|
|
||||||
_ui->checkBox_octomap->setChecked(false);
|
_ui->checkBox_octomap->setChecked(false);
|
||||||
_ui->spinBox_octomap_treeDepth->setValue(16);
|
_ui->spinBox_octomap_treeDepth->setValue(16);
|
||||||
|
_ui->checkBox_octomap_groundObstacle->setChecked(true);
|
||||||
|
|
||||||
_ui->doubleSpinBox_mesh_angleTolerance->setValue(15.0);
|
_ui->doubleSpinBox_mesh_angleTolerance->setValue(15.0);
|
||||||
#if PCL_VERSION_COMPARE(>=, 1, 7, 2)
|
#if PCL_VERSION_COMPARE(>=, 1, 7, 2)
|
||||||
@@ -1589,6 +1592,7 @@ void PreferencesDialog::readGuiSettings(const QString & filePath)
|
|||||||
|
|
||||||
_ui->checkBox_octomap->setChecked(settings.value("octomap", _ui->checkBox_octomap->isChecked()).toBool());
|
_ui->checkBox_octomap->setChecked(settings.value("octomap", _ui->checkBox_octomap->isChecked()).toBool());
|
||||||
_ui->spinBox_octomap_treeDepth->setValue(settings.value("octomap_depth", _ui->spinBox_octomap_treeDepth->value()).toInt());
|
_ui->spinBox_octomap_treeDepth->setValue(settings.value("octomap_depth", _ui->spinBox_octomap_treeDepth->value()).toInt());
|
||||||
|
_ui->checkBox_octomap_groundObstacle->setChecked(settings.value("octomap_ground_is_obstacle", _ui->checkBox_octomap_groundObstacle->isChecked()).toBool());
|
||||||
|
|
||||||
_ui->groupBox_organized->setChecked(settings.value("meshing", _ui->groupBox_organized->isChecked()).toBool());
|
_ui->groupBox_organized->setChecked(settings.value("meshing", _ui->groupBox_organized->isChecked()).toBool());
|
||||||
_ui->doubleSpinBox_mesh_angleTolerance->setValue(settings.value("meshing_angle", _ui->doubleSpinBox_mesh_angleTolerance->value()).toDouble());
|
_ui->doubleSpinBox_mesh_angleTolerance->setValue(settings.value("meshing_angle", _ui->doubleSpinBox_mesh_angleTolerance->value()).toDouble());
|
||||||
@@ -1999,6 +2003,7 @@ void PreferencesDialog::writeGuiSettings(const QString & filePath) const
|
|||||||
|
|
||||||
settings.setValue("octomap", _ui->checkBox_octomap->isChecked());
|
settings.setValue("octomap", _ui->checkBox_octomap->isChecked());
|
||||||
settings.setValue("octomap_depth", _ui->spinBox_octomap_treeDepth->value());
|
settings.setValue("octomap_depth", _ui->spinBox_octomap_treeDepth->value());
|
||||||
|
settings.setValue("octomap_ground_is_obstacle", _ui->checkBox_octomap_groundObstacle->isChecked());
|
||||||
|
|
||||||
settings.setValue("meshing", _ui->groupBox_organized->isChecked());
|
settings.setValue("meshing", _ui->groupBox_organized->isChecked());
|
||||||
settings.setValue("meshing_angle", _ui->doubleSpinBox_mesh_angleTolerance->value());
|
settings.setValue("meshing_angle", _ui->doubleSpinBox_mesh_angleTolerance->value());
|
||||||
@@ -3663,6 +3668,10 @@ int PreferencesDialog::getOctomapTreeDepth() const
|
|||||||
{
|
{
|
||||||
return _ui->spinBox_octomap_treeDepth->value();
|
return _ui->spinBox_octomap_treeDepth->value();
|
||||||
}
|
}
|
||||||
|
bool PreferencesDialog::isOctomapGroundAnObstacle() const
|
||||||
|
{
|
||||||
|
return _ui->checkBox_octomap_groundObstacle->isChecked();
|
||||||
|
}
|
||||||
|
|
||||||
double PreferencesDialog::getMapVoxel() const
|
double PreferencesDialog::getMapVoxel() const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>-464</y>
|
<y>-568</y>
|
||||||
<width>686</width>
|
<width>686</width>
|
||||||
<height>2023</height>
|
<height>2023</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -785,6 +785,19 @@ Show a yellow background when the number of odometry inliers goes under this thr
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout_67" columnstretch="0,1">
|
<layout class="QGridLayout" name="gridLayout_67" columnstretch="0,1">
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_projMaxObstaclesHeight">
|
||||||
|
<property name="suffix">
|
||||||
|
<string> m</string>
|
||||||
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>9999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="5" column="1">
|
||||||
<widget class="QLabel" name="label_309">
|
<widget class="QLabel" name="label_309">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -928,19 +941,6 @@ Show a yellow background when the number of odometry inliers goes under this thr
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_projMaxObstaclesHeight">
|
|
||||||
<property name="suffix">
|
|
||||||
<string> m</string>
|
|
||||||
</property>
|
|
||||||
<property name="decimals">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>9999.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QCheckBox" name="checkBox_octomap">
|
<widget class="QCheckBox" name="checkBox_octomap">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -990,6 +990,29 @@ Show a yellow background when the number of odometry inliers goes under this thr
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="8" column="1">
|
||||||
|
<widget class="QLabel" name="label_octomap_groundObstacle">
|
||||||
|
<property name="text">
|
||||||
|
<string>Octomap: ground is an obstacle.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0">
|
||||||
|
<widget class="QCheckBox" name="checkBox_octomap_groundObstacle">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user