mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Registration: if parent registration fails, continue with the child if the prior guess is not null
This commit is contained in:
@@ -186,6 +186,11 @@ Transform Registration::computeTransformationMod(
|
||||
info = *infoOut;
|
||||
}
|
||||
|
||||
if(!guess.isNull() && force3DoF_)
|
||||
{
|
||||
guess = guess.to3DoF();
|
||||
}
|
||||
|
||||
Transform t = computeTransformationImpl(from, to, guess, info);
|
||||
|
||||
if(varianceFromInliersCount_)
|
||||
@@ -207,6 +212,11 @@ Transform Registration::computeTransformationMod(
|
||||
{
|
||||
t = child_->computeTransformationMod(from, to, force3DoF_?t.to3DoF():t, &info);
|
||||
}
|
||||
else if(!guess.isNull())
|
||||
{
|
||||
// This registration approach failed, continue with the guess for the next registration
|
||||
t = child_->computeTransformationMod(from, to, guess, &info);
|
||||
}
|
||||
}
|
||||
else if(!t.isNull() && force3DoF_)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user