29 #include "ui_loopClosureViewer.h" 39 #include <QtCore/QTimer> 49 ui_ =
new Ui_loopClosureViewer();
51 ui_->cloudViewerTransform->setCameraLockZ(
false);
53 connect(
ui_->checkBox_rawCloud, SIGNAL(clicked()),
this, SLOT(
updateView()));
66 ui_->label_idA->setText(QString(
"[%1-%2]").arg(sA.
id()).arg(sB.
id()));
78 if(!
ui_->checkBox_rawCloud->isChecked())
85 UDEBUG(
"decimation = %d", decimation);
86 UDEBUG(
"maxDepth = %f", maxDepth);
87 UDEBUG(
"minDepth = %d", minDepth);
105 ui_->label_transform->setText(QString(
"(%1)").arg(t.
prettyPrint().c_str()));
109 pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloudA, cloudB;
114 pcl::PointCloud<pcl::PointXYZ>::Ptr scanA, scanB;
118 ui_->label_idA->setText(QString(
"[%1 (%2) -> %3 (%4)]").arg(
sB_.
id()).arg(cloudB->size()).arg(
sA_.
id()).arg(cloudA->size()));
122 ui_->cloudViewerTransform->addCloud(
"cloud0", cloudA);
127 ui_->cloudViewerTransform->addCloud(
"cloud1", cloudB);
131 ui_->cloudViewerTransform->addCloud(
"scan0", scanA);
136 ui_->cloudViewerTransform->addCloud(
"scan1", scanB);
141 UERROR(
"loop transform is null !?!?");
142 ui_->cloudViewerTransform->removeAllClouds();
144 ui_->cloudViewerTransform->refreshView();
151 QWidget::showEvent( event );
152 QTimer::singleShot(500,
this, SLOT(
updateView()));
pcl::PointCloud< pcl::PointXYZ >::Ptr RTABMAP_EXP transformPointCloud(const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, const Transform &transform)
virtual ~LoopClosureViewer()
std::map< std::string, std::string > ParametersMap
void setData(const Signature &sA, const Signature &sB)
pcl::PointCloud< pcl::PointXYZ >::Ptr RTABMAP_EXP laserScanToPointCloud(const LaserScan &laserScan, const Transform &transform=Transform())
const Signature & sA() const
virtual void showEvent(QShowEvent *event)
void updateView(const Transform &AtoB=Transform(), const ParametersMap ¶meters=ParametersMap())
Wrappers of STL for convenient functions.
Ui_loopClosureViewer * ui_
const Signature & sB() const
pcl::PointCloud< pcl::PointXYZRGB >::Ptr RTABMAP_EXP cloudRGBFromSensorData(const SensorData &sensorData, int decimation=1, float maxDepth=0.0f, float minDepth=0.0f, std::vector< int > *validIndices=0, const ParametersMap &stereoParameters=ParametersMap(), const std::vector< float > &roiRatios=std::vector< float >())
LoopClosureViewer(QWidget *parent=0)
const LaserScan & laserScanRaw() const
SensorData & sensorData()
const Transform & getPose() const
ULogger class and convenient macros.
Transform localTransform() const