mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
Fixed Stereo parameters not used for OdometryBOW. Saving parameters in Memory and Feature2D to re-use old parameters when underlaying algorithm strategies are re-created.
This commit is contained in:
@@ -449,6 +449,23 @@ inline void uInsert(std::map<K, V> & map, const std::pair<K, V> & pair)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert items in the map. Contrary to the insert in the STL,
|
||||
* if the key already exists, the value will be replaced by the new one.
|
||||
*/
|
||||
template<class K, class V>
|
||||
inline void uInsert(std::map<K, V> & map, const std::map<K, V> & items)
|
||||
{
|
||||
for(typename std::map<K, V>::const_iterator iter=items.begin(); iter!=items.end(); ++iter)
|
||||
{
|
||||
std::pair<typename std::map<K, V>::iterator, bool> inserted = map.insert(*iter);
|
||||
if(inserted.second == false)
|
||||
{
|
||||
inserted.first->second = iter->second;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a std::list to a std::vector.
|
||||
* @param list the list
|
||||
|
||||
Reference in New Issue
Block a user