fixed build with older libpointmatcher versions <10300

This commit is contained in:
matlabbe
2020-11-29 19:30:30 -05:00
parent 0022b6b993
commit 96c1c81e22

View File

@@ -592,10 +592,11 @@ void RegistrationIcp::parseParameters(const ParametersMap & parameters)
{
PointMatcher<float> matcher;
typedef typename PointMatcherSupport::Registrar< PointMatcher<float>::Matcher >::template GenericClassDescriptor< KDTreeMatcherIntensity<float> > Desc;
matcher.MatcherRegistrar.reg("KDTreeMatcherIntensity", std::make_shared<Desc>() );
#if POINTMATCHER_VERSION_INT >= 10300
matcher.MatcherRegistrar.reg("KDTreeMatcherIntensity", std::make_shared<Desc>() );
icp->matcher = matcher.MatcherRegistrar.create("KDTreeMatcherIntensity", params);
#else
matcher.MatcherRegistrar.reg("KDTreeMatcherIntensity", new Desc() );
icp->matcher.reset(matcher.MatcherRegistrar.create("KDTreeMatcherIntensity", params));
#endif
}