mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
DatabaseViewer: fixed ICP refined clouds superposition error
This commit is contained in:
@@ -2249,12 +2249,12 @@ void DatabaseViewer::updateConstraintView(
|
|||||||
|
|
||||||
if(cloudFrom->size())
|
if(cloudFrom->size())
|
||||||
{
|
{
|
||||||
ui_->constraintsViewer->addOrUpdateCloud("words0", cloudFrom, Transform::getIdentity(), Qt::red);
|
ui_->constraintsViewer->addOrUpdateCloud("cloud0", cloudFrom, Transform::getIdentity(), Qt::red);
|
||||||
}
|
}
|
||||||
if(cloudTo->size())
|
if(cloudTo->size())
|
||||||
{
|
{
|
||||||
cloudTo = rtabmap::util3d::transformPointCloud(cloudTo, t);
|
cloudTo = rtabmap::util3d::transformPointCloud(cloudTo, t);
|
||||||
ui_->constraintsViewer->addOrUpdateCloud("words1", cloudTo, Transform::getIdentity(), Qt::cyan);
|
ui_->constraintsViewer->addOrUpdateCloud("cloud1", cloudTo, Transform::getIdentity(), Qt::cyan);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(ui_->checkBox_show3DWords->isChecked())
|
if(ui_->checkBox_show3DWords->isChecked())
|
||||||
@@ -2297,28 +2297,28 @@ void DatabaseViewer::updateConstraintView(
|
|||||||
|
|
||||||
if(cloudFrom->size())
|
if(cloudFrom->size())
|
||||||
{
|
{
|
||||||
ui_->constraintsViewer->addOrUpdateCloud("cloud0", cloudFrom, Transform::getIdentity(), Qt::red);
|
ui_->constraintsViewer->addOrUpdateCloud("words0", cloudFrom, Transform::getIdentity(), Qt::red);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UWARN("Empty 3D words for node %d", link.from());
|
UWARN("Empty 3D words for node %d", link.from());
|
||||||
ui_->constraintsViewer->removeCloud("cloud0");
|
ui_->constraintsViewer->removeCloud("words0");
|
||||||
}
|
}
|
||||||
if(cloudTo->size())
|
if(cloudTo->size())
|
||||||
{
|
{
|
||||||
ui_->constraintsViewer->addOrUpdateCloud("cloud1", cloudTo, Transform::getIdentity(), Qt::cyan);
|
ui_->constraintsViewer->addOrUpdateCloud("words1", cloudTo, Transform::getIdentity(), Qt::cyan);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UWARN("Empty 3D words for node %d", link.to());
|
UWARN("Empty 3D words for node %d", link.to());
|
||||||
ui_->constraintsViewer->removeCloud("cloud1");
|
ui_->constraintsViewer->removeCloud("words1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UERROR("Not found signature %d or %d in RAM", link.from(), link.to());
|
UERROR("Not found signature %d or %d in RAM", link.from(), link.to());
|
||||||
ui_->constraintsViewer->removeCloud("cloud0");
|
ui_->constraintsViewer->removeCloud("words0");
|
||||||
ui_->constraintsViewer->removeCloud("cloud1");
|
ui_->constraintsViewer->removeCloud("words1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user