Increased package to 0.10.10: Updated RVIZ InfoDisplay plugin

This commit is contained in:
matlabbe
2015-10-13 16:58:14 -04:00
parent 674fe34255
commit a10b0c34b4
4 changed files with 14 additions and 2 deletions
+11
View File
@@ -76,8 +76,13 @@ void InfoDisplay::processMessage( const rtabmap_ros::InfoConstPtr& msg )
info_ = "";
}
loopTransform_ = rtabmap_ros::transformFromGeometryMsg(msg->loopClosureTransform);
rtabmap::Statistics stat;
rtabmap_ros::infoFromROS(*msg, stat);
statistics_ = stat.data();
}
this->emitTimeSignal(msg->header.stamp);
}
@@ -100,6 +105,11 @@ void InfoDisplay::update( float wall_dt, float ros_dt )
}
this->setStatusStd(rviz::StatusProperty::Ok, "Global", tr("%1").arg(globalCount_).toStdString());
this->setStatusStd(rviz::StatusProperty::Ok, "Local", tr("%1").arg(localCount_).toStdString());
for(std::map<std::string, float>::const_iterator iter=statistics_.begin(); iter!=statistics_.end(); ++iter)
{
this->setStatus(rviz::StatusProperty::Ok, iter->first.c_str(), tr("%1").arg(iter->second));
}
}
}
@@ -111,6 +121,7 @@ void InfoDisplay::reset()
info_.clear();
globalCount_ = 0;
localCount_ = 0;
statistics_.clear();
}
}
+1
View File
@@ -60,6 +60,7 @@ private:
QString info_;
int globalCount_;
int localCount_;
std::map<std::string, float> statistics_;
rtabmap::Transform loopTransform_;
boost::mutex info_mutex_;
};