1 #ifndef SLAM_CTOR_CORE_BRUTE_FORCE_MULTIRES_SCAN_MATCHER_H 2 #define SLAM_CTOR_CORE_BRUTE_FORCE_MULTIRES_SCAN_MATCHER_H 8 #include "../maps/rescalable_caching_grid_map.h" 9 #include "../geometry_primitives.h" 18 double transl_step = 0.05)
33 obs->on_matching_start(pose, raw_scan, map);
47 raw_scan.
scan, rescalable_map,
true);
50 assert(best_match.is_valid());
51 if (best_match.is_finest()) {
52 result_pose_delta = {best_match.translation_drift.center(),
55 obs->on_matching_end(result_pose_delta, *best_match.filtered_scan,
56 best_match.prob_upper_bound);
58 return best_match.prob_upper_bound;
63 auto crucial_points = best_match.translation_drift.corners();
64 crucial_points.push_back(best_match.translation_drift.center());
66 for (
const auto &cp : crucial_points) {
77 #endif // include guard void set_translation_lookup_range(double max_x_error, double max_y_error)
BruteForceMultiResolutionScanMatcher(SPE est, double ang_step=deg2rad(0.1), double transl_step=0.05)
std::shared_ptr< ScanProbabilityEstimator > SPE
void set_rotation_lookup_range(double sector, double step)
Match next_best_match(double translation_step)
std::shared_ptr< GridScanMatcherObserver > ObsPtr
static constexpr double _Max_Rotation_Error
void add_match(Match &&match)
double process_scan(const TransformedLaserScan &raw_scan, const RobotPose &pose, const GridMap &map, RobotPoseDelta &result_pose_delta) override
void do_for_each_observer(std::function< void(ObsPtr)> op)
decltype(SPEParams{}.sp_analysis_area) Rect
SPE scan_probability_estimator() const
void add_scan_matching_request(std::shared_ptr< ScanProbabilityEstimator > spe, const RobotPose &pose, const LaserScan2D &raw_scan, GridMap &map, bool prerotate_scan=false)
constexpr double deg2rad(double angle_deg)
void reset_engine_state()
void set_target_accuracy(double angle_step, double translation_step)
static constexpr double _Max_Translation_Error