42 #include <boost/format.hpp>
48 PointMatcher<T>::DataPointsFilter(
"SimpleSensorNoiseDataPointsFilter",
53 std::vector<std::string> sensorNames = {
"Sick LMS-1xx",
56 "Kinect / Xtion",
"Sick Tim3xx"};
60 (boost::format(
"SimpleSensorNoiseDataPointsFilter: Error, sensorType id %1% does not exist.") %
sensorType).str());
74 inPlaceFilter(output);
89 noise = computeLaserNoise(0.012, 0.0068, 0.0008, cloud.
features);
94 noise = computeLaserNoise(0.028, 0.0013, 0.0001, cloud.
features);
99 noise = computeLaserNoise(0.018, 0.0006, 0.0015, cloud.
features);
104 const int dim = cloud.
features.rows();
105 const Matrix squaredValues(cloud.
features.topRows(dim-1).colwise().norm().array().square());
106 noise = squaredValues*(0.5*0.00285);
111 noise = computeLaserNoise(0.004, 0.0053, -0.0092, cloud.
features);
116 (boost::format(
"SimpleSensorNoiseDataPointsFilter: Error, cannot compute noise for sensorType id %1% .") % sensorType).str());
124 const T minRadius,
const T beamAngle,
const T beamConst,
const Matrix& features)
126 typedef typename Eigen::Array<T, 2, Eigen::Dynamic> Array2rows;
128 const int nbPoints = features.cols();
129 const int dim = features.rows();
131 Array2rows evalNoise = Array2rows::Constant(2, nbPoints, minRadius);
132 evalNoise.row(0) = beamAngle * features.topRows(dim-1).colwise().norm();
133 evalNoise.row(0) += beamConst;
135 return evalNoise.colwise().maxCoeff();