OccupancyGrid: added getCache() method

This commit is contained in:
matlabbe
2018-08-02 16:53:44 -04:00
parent e03da92a90
commit a0342671ac
3 changed files with 3 additions and 2 deletions

View File

@@ -53,6 +53,7 @@ public:
bool isMapFrameProjection() const {return projMapFrame_;}
const std::map<int, Transform> & addedNodes() const {return addedNodes_;}
int cacheSize() const {return (int)cache_.size();}
const std::map<int, std::pair<std::pair<cv::Mat, cv::Mat>, cv::Mat> > & getCache() const {return cache_;}
template<typename PointT>
typename pcl::PointCloud<PointT>::Ptr segmentCloud(

View File

@@ -786,7 +786,7 @@ void OccupancyGrid::update(const std::map<int, Transform> & posesIn)
{
if(addedNodes_.find(iter->first) == addedNodes_.end())
{
UDEBUG("Pose %d not found in current added poses, it be added to map", iter->first);
UDEBUG("Pose %d not found in current added poses, it will be added to map", iter->first);
poses.push_back(*iter);
}
}

View File

@@ -1162,7 +1162,7 @@ std::vector<int> VWDictionary::findNN(const cv::Mat & queryIn) const
{
float d = dists.at<float>(i,j);
int index;
UWARN("results elemSize1=%d", results.elemSize1());
if (sizeof(size_t) == 8)
{
index = *((size_t*)&results.at<double>(i, j));