Fixed Force4DoF param not used exception on older libpointmatcher versions

This commit is contained in:
matlabbe
2021-03-02 17:27:25 -05:00
parent 4e4207a6dd
commit 98c69c4578

View File

@@ -615,7 +615,11 @@ void RegistrationIcp::parseParameters(const ParametersMap & parameters)
params.clear();
params["force2D"] = force3DoF()?"1":"0";
params["force4DOF"] = !force3DoF()&&_libpointmatcherForce4DoF?"1":"0";
if(!force3DoF()&&_libpointmatcherForce4DoF)
{
params["force4DOF"] = "1";
}
#if POINTMATCHER_VERSION_INT >= 10300
icp->errorMinimizer = PM::get().ErrorMinimizerRegistrar.create("PointToPlaneErrorMinimizer", params);
#else