fixed some pcl warnings when getMap() service is called and no 3d words are set

This commit is contained in:
Mathieu Labbe
2014-12-01 15:59:08 -05:00
parent ea3c14eb1b
commit 5318b542b7
+4 -1
View File
@@ -305,7 +305,10 @@ void GuiWrapper::processRequestedMap(const rtabmap_ros::MapData & map)
std::multimap<int, cv::KeyPoint> words;
std::multimap<int, pcl::PointXYZ> words3D;
pcl::PointCloud<pcl::PointXYZ> cloud;
pcl::fromROSMsg(map.nodes[i].words3DValues, cloud);
if(map.nodes[i].words3DValues.data.size())
{
pcl::fromROSMsg(map.nodes[i].words3DValues, cloud);
}
for(unsigned int j=0; j<map.nodes[i].wordsKeys.size() && j<map.nodes[0].wordsValues.size(); ++j)
{
cv::KeyPoint pt;