mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-06 18:17:47 +08:00
Rtabmap::detectMoreLoopClosures: added clusterRadiusMin parameter and update optimized poses after each accepted loop closure (also in MainWindow) like in DbViewer. Added graph::computeMinMax(poses). OdometryInfo: added guess transform. Export: added min/max axis ranges to filter nodes before expoting clouds.
This commit is contained in:
@@ -2334,6 +2334,33 @@ std::list<std::map<int, Transform> > getPaths(
|
||||
return paths;
|
||||
}
|
||||
|
||||
void computeMinMax(const std::map<int, Transform> & poses,
|
||||
cv::Vec3f & min,
|
||||
cv::Vec3f & max)
|
||||
{
|
||||
if(!poses.empty())
|
||||
{
|
||||
min[0] = max[0] = poses.begin()->second.x();
|
||||
min[1] = max[1] = poses.begin()->second.y();
|
||||
min[2] = max[2] = poses.begin()->second.z();
|
||||
for(std::map<int, Transform>::const_iterator iter=poses.begin(); iter!=poses.end(); ++iter)
|
||||
{
|
||||
if(min[0] > iter->second.x())
|
||||
min[0] = iter->second.x();
|
||||
if(max[0] < iter->second.x())
|
||||
max[0] = iter->second.x();
|
||||
if(min[1] > iter->second.y())
|
||||
min[1] = iter->second.y();
|
||||
if(max[1] < iter->second.y())
|
||||
max[1] = iter->second.y();
|
||||
if(min[2] > iter->second.z())
|
||||
min[2] = iter->second.z();
|
||||
if(max[2] < iter->second.z())
|
||||
max[2] = iter->second.z();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} /* namespace graph */
|
||||
|
||||
} /* namespace rtabmap */
|
||||
|
||||
Reference in New Issue
Block a user