Registry.cpp
Go to the documentation of this file.
1 // vim: ts=4:sw=4:noexpandtab
2 /*
3 
4 Copyright (c) 2010--2012,
5 François Pomerleau and Stephane Magnenat, ASL, ETHZ, Switzerland
6 You can contact the authors at <f dot pomerleau at gmail dot com> and
7 <stephane at magnenat dot net>
8 
9 All rights reserved.
10 
11 Redistribution and use in source and binary forms, with or without
12 modification, are permitted provided that the following conditions are met:
13  * Redistributions of source code must retain the above copyright
14  notice, this list of conditions and the following disclaimer.
15  * Redistributions in binary form must reproduce the above copyright
16  notice, this list of conditions and the following disclaimer in the
17  documentation and/or other materials provided with the distribution.
18  * Neither the name of the <organization> nor the
19  names of its contributors may be used to endorse or promote products
20  derived from this software without specific prior written permission.
21 
22 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
23 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25 DISCLAIMED. IN NO EVENT SHALL ETH-ASL BE LIABLE FOR ANY
26 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
29 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 
33 */
34 
35 #include "PointMatcher.h"
36 #include "PointMatcherPrivate.h"
37 
38 #include "LoggerImpl.h"
39 #include "TransformationsImpl.h"
40 #include "DataPointsFiltersImpl.h"
41 #include "MatchersImpl.h"
42 #include "OutlierFiltersImpl.h"
43 #include "ErrorMinimizersImpl.h"
45 #include "InspectorsImpl.h"
46 
47 #include <cassert>
48 #include <iostream>
49 #include <limits>
50 
51 using namespace std;
52 using namespace PointMatcherSupport;
53 
55 InvalidElement::InvalidElement(const std::string& reason):
56  runtime_error(reason)
57 {}
58 
60 template<typename T>
62 {
63  ADD_TO_REGISTRAR_NO_PARAM(Transformation, RigidTransformation, typename TransformationsImpl<T>::RigidTransformation)
64  ADD_TO_REGISTRAR_NO_PARAM(Transformation, PureTranslation, typename TransformationsImpl<T>::PureTranslation)
65 
92 
93  ADD_TO_REGISTRAR_NO_PARAM(Matcher, NullMatcher, typename MatchersImpl<T>::NullMatcher)
94  ADD_TO_REGISTRAR(Matcher, KDTreeMatcher, typename MatchersImpl<T>::KDTreeMatcher)
95  ADD_TO_REGISTRAR(Matcher, KDTreeVarDistMatcher, typename MatchersImpl<T>::KDTreeVarDistMatcher)
96 
97  ADD_TO_REGISTRAR_NO_PARAM(OutlierFilter, NullOutlierFilter, typename OutlierFiltersImpl<T>::NullOutlierFilter)
98  ADD_TO_REGISTRAR(OutlierFilter, MaxDistOutlierFilter, typename OutlierFiltersImpl<T>::MaxDistOutlierFilter)
99  ADD_TO_REGISTRAR(OutlierFilter, MinDistOutlierFilter, typename OutlierFiltersImpl<T>::MinDistOutlierFilter)
100  ADD_TO_REGISTRAR(OutlierFilter, MedianDistOutlierFilter, typename OutlierFiltersImpl<T>::MedianDistOutlierFilter)
101  ADD_TO_REGISTRAR(OutlierFilter, TrimmedDistOutlierFilter, typename OutlierFiltersImpl<T>::TrimmedDistOutlierFilter)
102  ADD_TO_REGISTRAR(OutlierFilter, VarTrimmedDistOutlierFilter, typename OutlierFiltersImpl<T>::VarTrimmedDistOutlierFilter)
103  ADD_TO_REGISTRAR(OutlierFilter, SurfaceNormalOutlierFilter, typename OutlierFiltersImpl<T>::SurfaceNormalOutlierFilter)
104  ADD_TO_REGISTRAR(OutlierFilter, GenericDescriptorOutlierFilter, typename OutlierFiltersImpl<T>::GenericDescriptorOutlierFilter)
105  ADD_TO_REGISTRAR(OutlierFilter, RobustOutlierFilter, typename OutlierFiltersImpl<T>::RobustOutlierFilter)
106 
113 
114  ADD_TO_REGISTRAR(TransformationChecker, CounterTransformationChecker, typename TransformationCheckersImpl<T>::CounterTransformationChecker)
115  ADD_TO_REGISTRAR(TransformationChecker, DifferentialTransformationChecker, typename TransformationCheckersImpl<T>::DifferentialTransformationChecker)
116  ADD_TO_REGISTRAR(TransformationChecker, BoundTransformationChecker, typename TransformationCheckersImpl<T>::BoundTransformationChecker)
117 
118  ADD_TO_REGISTRAR_NO_PARAM(Inspector, NullInspector, typename InspectorsImpl<T>::NullInspector)
119  ADD_TO_REGISTRAR(Inspector, PerformanceInspector, typename InspectorsImpl<T>::PerformanceInspector)
120  ADD_TO_REGISTRAR(Inspector, VTKFileInspector, typename InspectorsImpl<T>::VTKFileInspector)
121 
124 }
125 
126 // static instances plus wrapper function to get them from templatized static method in PointMatcher
127 
130 
131 template<typename T>
132 const PointMatcher<T>& _getPM();
133 
134 template<>
136 template<>
138 
140 template<typename T>
142 {
143  return _getPM<T>();
144 }
145 
Subsampling. Filter points beyond a maximum distance measured on a specific axis. ...
Definition: MaxDist.h:41
::CutAtDescriptorThresholdDataPointsFilter< T > CutAtDescriptorThresholdDataPointsFilter
Subsampling. Filter points based on distance measured on a specific axis.
Definition: DistanceLimit.h:41
const PointMatcher< float > & _getPM< float >()
Definition: Registry.cpp:135
::IdentityDataPointsFilter< T > IdentityDataPointsFilter
::RemoveSensorBiasDataPointsFilter< T > RemoveSensorBiasDataPointsFilter
::RemoveNaNDataPointsFilter< T > RemoveNaNDataPointsFilter
public interface
The logger interface, used to output warnings and informations.
Definition: PointMatcher.h:104
IdentityDataPointsFilter, does nothing.
::PointToPlaneErrorMinimizer< T > PointToPlaneErrorMinimizer
::MaxPointCountDataPointsFilter< T > MaxPointCountDataPointsFilter
::SimpleSensorNoiseDataPointsFilter< T > SimpleSensorNoiseDataPointsFilter
::std::string string
Definition: gtest.h:1979
Remove points having NaN as coordinate.
Definition: RemoveNaN.h:41
::MaxQuantileOnAxisDataPointsFilter< T > MaxQuantileOnAxisDataPointsFilter
PointMatcher< float > _PointMatcherFloat
Definition: Registry.cpp:128
::MaxDistDataPointsFilter< T > MaxDistDataPointsFilter
Maximum number of points.
Definition: MaxPointCount.h:41
Shadow filter, remove ghost points appearing on edges.
Definition: Shadow.h:41
::ShadowDataPointsFilter< T > ShadowDataPointsFilter
PointMatcher()
Constructor, populates the registrars.
Definition: Registry.cpp:61
Subsampling. Cut points with value of a given descriptor above or below a given threshold.
PointMatcher< double > _PointMatcherDouble
Definition: Registry.cpp:129
::NormalSpaceDataPointsFilter< T > NormalSpaceDataPointsFilter
Sick LMS-xxx noise model.
Functions and classes that are not dependant on scalar type are defined in this namespace.
::BoundingBoxDataPointsFilter< T > BoundingBoxDataPointsFilter
Sampling surface normals. First decimate the space until there is at most knn points, then find the center of mass and use the points to estimate nromal using eigen-decomposition.
static const PointMatcher & get()
Return instances.
Definition: Registry.cpp:141
::SurfaceNormalDataPointsFilter< T > SurfaceNormalDataPointsFilter
::DistanceLimitDataPointsFilter< T > DistanceLimitDataPointsFilter
#define ADD_TO_REGISTRAR(name, elementName, element)
Definition: Registrar.h:223
::RandomSamplingDataPointsFilter< T > RandomSamplingDataPointsFilter
Data Filter based on Octree representation.
Definition: OctreeGrid.h:54
::OctreeGridDataPointsFilter< T > OctreeGridDataPointsFilter
#define ADD_TO_REGISTRAR_NO_PARAM(name, elementName, element)
Definition: Registrar.h:227
const PointMatcher< T > & _getPM()
::CovarianceSamplingDataPointsFilter< T > CovarianceSamplingDataPointsFilter
const PointMatcher< double > & _getPM< double >()
Definition: Registry.cpp:137
::IncidenceAngleDataPointsFilter< T > IncidenceAngleDataPointsFilter
Gestalt descriptors filter as described in Bosse & Zlot ICRA 2013.
Definition: Gestalt.h:41
::PointToPlaneWithCovErrorMinimizer< T > PointToPlaneWithCovErrorMinimizer
::PointToPointSimilarityErrorMinimizer< T > PointToPointSimilarityErrorMinimizer
::IdentityErrorMinimizer< T > IdentityErrorMinimizer
Surface normals estimation. Find the normal for every point using eigen-decomposition of neighbour po...
Definition: SurfaceNormal.h:43
::PointToPointErrorMinimizer< T > PointToPointErrorMinimizer
::VoxelGridDataPointsFilter< T > VoxelGridDataPointsFilter
::FixStepSamplingDataPointsFilter< T > FixStepSamplingDataPointsFilter
::GestaltDataPointsFilter< T > GestaltDataPointsFilter
::MaxDensityDataPointsFilter< T > MaxDensityDataPointsFilter
Subsampling. Filter points beyond a maximum quantile measured on a specific axis. ...
Extract observation direction.
::OrientNormalsDataPointsFilter< T > OrientNormalsDataPointsFilter
Subsampling. Filter points before a minimum distance measured on a specific axis. ...
Definition: MinDist.h:41
::ObservationDirectionDataPointsFilter< T > ObservationDirectionDataPointsFilter
::SamplingSurfaceNormalDataPointsFilter< T > SamplingSurfaceNormalDataPointsFilter
Subsampling. Reduce the points number by randomly removing points with a dentsity higher than a tresh...
Definition: MaxDensity.h:41
::MinDistDataPointsFilter< T > MinDistDataPointsFilter
Systematic sampling, with variation over time.
::ElipsoidsDataPointsFilter< T > ElipsoidsDataPointsFilter
Reorientation of normals.
Definition: OrientNormals.h:41
::PointToPointWithCovErrorMinimizer< T > PointToPointWithCovErrorMinimizer
Incidence angle, compute the incidence angle of a surface normal with the observation direction...
Subsampling Surfels (Elipsoids) filter. First decimate the space until there is at most knn points...
Definition: Elipsoids.h:41
Subsampling. Remove point laying in a bounding box.
Definition: BoundingBox.h:41


mrpt_local_obstacles
Author(s): Jose-Luis Blanco-Claraco
autogenerated on Thu Jun 1 2023 03:06:43