2015-11-22 18:08:32 -05:00
|
|
|
/*
|
2016-07-17 21:57:10 -04:00
|
|
|
Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
|
2015-11-22 18:08:32 -05:00
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
|
|
|
modification, are permitted provided that the following conditions are met:
|
|
|
|
|
* Redistributions of source code must retain the above copyright
|
|
|
|
|
notice, this list of conditions and the following disclaimer.
|
|
|
|
|
* Redistributions in binary form must reproduce the above copyright
|
|
|
|
|
notice, this list of conditions and the following disclaimer in the
|
|
|
|
|
documentation and/or other materials provided with the distribution.
|
|
|
|
|
* Neither the name of the Universite de Sherbrooke nor the
|
|
|
|
|
names of its contributors may be used to endorse or promote products
|
|
|
|
|
derived from this software without specific prior written permission.
|
|
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
|
|
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
|
|
|
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef REGISTRATIONICP_H_
|
|
|
|
|
#define REGISTRATIONICP_H_
|
|
|
|
|
|
2016-01-05 15:29:29 -05:00
|
|
|
#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
|
|
|
|
|
|
2015-11-22 18:08:32 -05:00
|
|
|
#include <rtabmap/core/Registration.h>
|
|
|
|
|
#include <rtabmap/core/Signature.h>
|
|
|
|
|
|
|
|
|
|
namespace rtabmap {
|
|
|
|
|
|
|
|
|
|
// Geometrical registration
|
2016-01-05 15:29:29 -05:00
|
|
|
class RTABMAP_EXP RegistrationIcp : public Registration
|
2015-11-22 18:08:32 -05:00
|
|
|
{
|
|
|
|
|
public:
|
2016-01-06 17:26:55 -05:00
|
|
|
// take ownership of child
|
|
|
|
|
RegistrationIcp(const ParametersMap & parameters = ParametersMap(), Registration * child = 0);
|
2017-08-22 16:20:49 -04:00
|
|
|
virtual ~RegistrationIcp();
|
2015-11-22 18:08:32 -05:00
|
|
|
|
|
|
|
|
virtual void parseParameters(const ParametersMap & parameters);
|
|
|
|
|
|
2016-01-06 17:26:55 -05:00
|
|
|
protected:
|
|
|
|
|
virtual Transform computeTransformationImpl(
|
2015-12-21 17:27:05 -05:00
|
|
|
Signature & from,
|
|
|
|
|
Signature & to,
|
2016-01-06 17:26:55 -05:00
|
|
|
Transform guess,
|
|
|
|
|
RegistrationInfo & info) const;
|
|
|
|
|
virtual bool isScanRequiredImpl() const {return true;}
|
2018-02-01 22:17:46 -05:00
|
|
|
virtual bool canUseGuessImpl() const {return true;}
|
2016-01-07 13:59:21 -05:00
|
|
|
virtual float getMinGeometryCorrespondencesRatioImpl() const {return _correspondenceRatio;}
|
2015-11-22 18:08:32 -05:00
|
|
|
|
|
|
|
|
private:
|
2015-11-25 12:15:41 -05:00
|
|
|
float _maxTranslation;
|
|
|
|
|
float _maxRotation;
|
|
|
|
|
float _voxelSize;
|
|
|
|
|
int _downsamplingStep;
|
|
|
|
|
float _maxCorrespondenceDistance;
|
|
|
|
|
int _maxIterations;
|
2016-01-12 11:37:50 -05:00
|
|
|
float _epsilon;
|
2015-11-25 12:15:41 -05:00
|
|
|
float _correspondenceRatio;
|
|
|
|
|
bool _pointToPlane;
|
2017-08-25 18:02:40 -04:00
|
|
|
int _pointToPlaneK;
|
|
|
|
|
float _pointToPlaneRadius;
|
2017-09-11 13:17:53 -04:00
|
|
|
float _pointToPlaneMinComplexity;
|
2017-08-22 16:20:49 -04:00
|
|
|
bool _libpointmatcher;
|
|
|
|
|
std::string _libpointmatcherConfig;
|
2017-12-09 21:44:53 -05:00
|
|
|
int _libpointmatcherKnn;
|
|
|
|
|
float _libpointmatcherEpsilon;
|
2017-08-23 12:22:58 -04:00
|
|
|
float _libpointmatcherOutlierRatio;
|
2017-08-22 16:20:49 -04:00
|
|
|
void * _libpointmatcherICP;
|
2015-11-22 18:08:32 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif /* REGISTRATIONICP_H_ */
|