mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
Vis: fixed assert when doing bundle adjustment with SignatureTo having no 3d words
This commit is contained in:
@@ -1565,9 +1565,12 @@ Transform RegistrationVis::computeTransformationImpl(
|
||||
}
|
||||
if(toSignature.getWords().size() && cameraModelTo.isValidForProjection())
|
||||
{
|
||||
float depthTo = util3d::transformPoint(toSignature.getWords3().find(wordId)->second, invLocalTransformTo).z;
|
||||
float depthTo = 0.0f;
|
||||
if(toSignature.getWords3().find(wordId) != toSignature.getWords3().end())
|
||||
{
|
||||
depthTo = util3d::transformPoint(toSignature.getWords3().find(wordId)->second, invLocalTransformTo).z;
|
||||
}
|
||||
const cv::KeyPoint & kpt = toSignature.getWords().find(wordId)->second;
|
||||
UASSERT(toSignature.getWords3().find(wordId) != toSignature.getWords3().end());
|
||||
ptMap.insert(std::make_pair(2,FeatureBA(kpt, depthTo)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user