Thanks!
One more question. What is the best practice to pick the parameters for "Optimizer::optimize(rootId, poses, constraints)"?
In particular, I didstd::map<int, int> ids = _memory->getNeighborsId(_memory->getLastSignatureId(), 0, 0); _memory->getMetricConstraints(uKeysSet(ids), poses, links); rtabmap::Optimizer *graphOptimizer = rtabmap::Optimizer::create(rtabmap::Optimizer::kTypeTORO); _optimizedPoses = graphOptimizer->optimize(poses.begin()->first, poses, links);
But it turns out the getLastSignatureId() doesn't have any neighbor in the graph extracted from the link table. So the ids contains only one id (the one returned by getLastSignatureId).
I then dostd::list<int> idList = uKeysList(_memory->getWorkingMem()); std::set<int> idSet(idList.begin(), idList.end()); _memory->getMetricConstraints(idSet, poses, links, lookInDatabase); rtabmap::Optimizer *graphOptimizer = rtabmap::Optimizer::create(rtabmap::Optimizer::kTypeTORO); _optimizedPoses = graphOptimizer->optimize(poses.begin()->first, poses, links);which solves my particular problem, but it cannot guarantee that the poses.begin()->first will contain any neighbor on the TORO graph. So I'm wondering whether there is a better way to do this.
Thanks!
KaifeiFree forum by Nabble | Edit this page |