25 #ifndef CARTOGRAPHER_MAPPING_2D_SCAN_MATCHING_FAST_CORRELATIVE_SCAN_MATCHER_H_ 26 #define CARTOGRAPHER_MAPPING_2D_SCAN_MATCHING_FAST_CORRELATIVE_SCAN_MATCHER_H_ 35 #include "cartographer/mapping_2d/scan_matching/proto/fast_correlative_scan_matcher_options.pb.h" 39 namespace mapping_2d {
40 namespace scan_matching {
42 proto::FastCorrelativeScanMatcherOptions
44 common::LuaParameterDictionary* parameter_dictionary);
53 std::vector<float>* reusable_intermediate_grid);
57 int GetValue(
const Eigen::Array2i& xy_index)
const {
58 const Eigen::Array2i local_xy_index = xy_index -
offset_;
64 if (static_cast<unsigned>(local_xy_index.x()) >=
66 static_cast<unsigned>(local_xy_index.y()) >=
71 return cells_[local_xy_index.x() + local_xy_index.y() * stride];
102 const proto::FastCorrelativeScanMatcherOptions& options);
128 bool MatchWithSearchParameters(
133 std::vector<Candidate> ComputeLowestResolutionCandidates(
134 const std::vector<DiscreteScan>& discrete_scans,
136 std::vector<Candidate> GenerateLowestResolutionCandidates(
139 const std::vector<DiscreteScan>& discrete_scans,
141 std::vector<Candidate>*
const candidates)
const;
142 Candidate BranchAndBound(
const std::vector<DiscreteScan>& discrete_scans,
144 const std::vector<Candidate>& candidates,
145 int candidate_depth,
float min_score)
const;
147 const proto::FastCorrelativeScanMatcherOptions
options_;
156 #endif // CARTOGRAPHER_MAPPING_2D_SCAN_MATCHING_FAST_CORRELATIVE_SCAN_MATCHER_H_
constexpr float kMinProbability
int GetValue(const Eigen::Array2i &xy_index) const
uint8 ComputeCellValue(float probability) const
constexpr float kMaxProbability
std::unique_ptr< PrecomputationGridStack > precomputation_grid_stack_
PrecomputationGrid(const ProbabilityGrid &probability_grid, const CellLimits &limits, int width, std::vector< float > *reusable_intermediate_grid)
std::vector< Eigen::Vector3f > PointCloud
const Eigen::Array2i offset_
static float ToProbability(float value)
const proto::FastCorrelativeScanMatcherOptions options_
proto::FastCorrelativeScanMatcherOptions CreateFastCorrelativeScanMatcherOptions(common::LuaParameterDictionary *const parameter_dictionary)
const CellLimits wide_limits_
std::vector< uint8 > cells_