源码可在https://github.com/learnmoreonce/SLAM 下载
文件:fixed_ratio_sampling_points_processor.h
#ifndef CARTOGRAPHER_IO_FIXED_RATIO_SAMPLING_POINTS_PROCESSOR_H_
#define CARTOGRAPHER_IO_FIXED_RATIO_SAMPLING_POINTS_PROCESSOR_H_
#include <memory>
#include "cartographer/common/fixed_ratio_sampler.h"
#include "cartographer/common/lua_parameter_dictionary.h"
#include "cartographer/io/points_processor.h"
namespace cartographer {
namespace io {
/*
FixedRatioSamplingPointsProcessor是PointsProcessor的第七个子类(7).
FixedRatioSamplingPointsProcessor是采样过滤器,
该class只让具有固定采样频率的点通过,其余全部 remove.
sampling_ratio=1,即无任何操作,全通滤波.
sparse_pose_graph.lua:
sampling_ratio = 0.3,
*/
// Only let a fixed 'sampling_ratio' of points through. A 'sampling_ratio' of 1.
// makes this filter a no-op.
class FixedRatioSamplingPointsProcessor : public PointsProcessor {
public:
constexpr static const