mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
gui: fixed odom local map hiding on rtabmap update
This commit is contained in:
@@ -2538,6 +2538,7 @@ void CloudViewer::setBackgroundColor(const QColor & color)
|
||||
|
||||
void CloudViewer::setCloudVisibility(const std::string & id, bool isVisible)
|
||||
{
|
||||
UWARN("isVisible=%d cloud=%s", isVisible?1:0, id.c_str());
|
||||
pcl::visualization::CloudActorMapPtr cloudActorMap = _visualizer->getCloudActorMap();
|
||||
pcl::visualization::CloudActorMap::iterator iter = cloudActorMap->find(id);
|
||||
if(iter != cloudActorMap->end())
|
||||
|
||||
@@ -2388,18 +2388,13 @@ void MainWindow::updateMapCloud(
|
||||
if(splitted.size() == 2)
|
||||
{
|
||||
id = std::atoi(splitted.back().c_str());
|
||||
if(splitted.front().at(splitted.front().size()-1) == '-')
|
||||
if(poses.find(id) == poses.end())
|
||||
{
|
||||
id*=-1;
|
||||
}
|
||||
}
|
||||
|
||||
if(poses.find(id) == poses.end())
|
||||
{
|
||||
if(_cloudViewer->getCloudVisibility(iter.key()))
|
||||
{
|
||||
UDEBUG("Hide %s", iter.key().c_str());
|
||||
_cloudViewer->setCloudVisibility(iter.key(), false);
|
||||
if(_cloudViewer->getCloudVisibility(iter.key()))
|
||||
{
|
||||
UDEBUG("Hide %s", iter.key().c_str());
|
||||
_cloudViewer->setCloudVisibility(iter.key(), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user