mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
using map instead of multimap for motion estimation methods (only unique words were used)
This commit is contained in:
@@ -848,8 +848,15 @@ void MainWindow::processOdometry(const rtabmap::OdometryEvent & odom)
|
||||
}
|
||||
}
|
||||
|
||||
//detect if it is OdometryMono intitialization
|
||||
bool monoInitialization = false;
|
||||
if(_preferencesDialog->getOdomStrategy() == 2 && odom.info().type == 1)
|
||||
{
|
||||
monoInitialization = true;
|
||||
}
|
||||
|
||||
_ui->imageView_odometry->clearLines();
|
||||
if(lost)
|
||||
if(lost && !monoInitialization)
|
||||
{
|
||||
if(lostStateChanged)
|
||||
{
|
||||
|
||||
@@ -265,7 +265,7 @@ void OdometryViewer::processData(const rtabmap::OdometryEvent & odom)
|
||||
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
|
||||
cloud->resize(odom.info().localMap.size());
|
||||
int i=0;
|
||||
for(std::multimap<int, cv::Point3f>::const_iterator iter=odom.info().localMap.begin(); iter!=odom.info().localMap.end(); ++iter)
|
||||
for(std::map<int, cv::Point3f>::const_iterator iter=odom.info().localMap.begin(); iter!=odom.info().localMap.end(); ++iter)
|
||||
{
|
||||
(*cloud)[i].x = iter->second.x;
|
||||
(*cloud)[i].y = iter->second.y;
|
||||
|
||||
Reference in New Issue
Block a user