init_gmapping.h
Go to the documentation of this file.
1 #ifndef SLAM_CTOR_SLAMS_INIT_GMAPPING_H
2 #define SLAM_CTOR_SLAMS_INIT_GMAPPING_H
3 
4 #include "../../utils/init_scan_matching.h"
5 #include "../../utils/init_occupancy_mapping.h"
6 #include "../../core/scan_matchers/weighted_mean_point_probability_spe.h"
7 
10 
12  return props.get_uint("slam/particles/number", 30);
13 }
14 
16  auto mean_sample_xy = props.get_dbl("slam/particles/sample/xy/mean", 0.0);
17  auto sigma_sample_xy = props.get_dbl("slam/particles/sample/xy/sigma", 0.1);
18  auto mean_sample_th = props.get_dbl("slam/particles/sample/theta/mean", 0.0);
19  auto sigma_sample_th = props.get_dbl("slam/particles/sample/theta/sigma",
20  0.03);
21 
22  auto min_sm_lim_xy = props.get_dbl("slam/particles/sm_delta_lim/xy/min",
23  0.6);
24  auto max_sm_lim_xy = props.get_dbl("slam/particles/sm_delta_lim/xy/max",
25  0.8);
26  auto min_sm_lim_th = props.get_dbl("slam/particles/sm_delta_lim/theta/min",
27  0.3);
28  auto max_sm_lim_th = props.get_dbl("slam/particles/sm_delta_lim/theta/max",
29  0.4);
30  return GMappingParams{mean_sample_xy, sigma_sample_xy,
31  mean_sample_th, sigma_sample_th,
32  min_sm_lim_xy, max_sm_lim_xy,
33  min_sm_lim_th, max_sm_lim_th};
34 }
35 
37  const std::string OOPE_Pfx = "slam/scmtch/oope/";
38  assert(props.get_str(OOPE_Pfx + "type", "custom") == "custom");
39 
40  using CustomOOPE = GmappingOccupancyObservationPE;
41  auto fullness_th = props.get_dbl(OOPE_Pfx + "custom/fullness_threshold", 0.1);
42  auto window_size = props.get_uint(OOPE_Pfx + "cutrom/window_size", 1);
43  auto oope = std::make_shared<CustomOOPE>(fullness_th, window_size);
44  return init_spe(props, oope);
45 }
46 
48 
49 auto init_gmapping(const PropertiesProvider &props) {
50  // TODO: remove grid cell strategy
51  auto shw_params = SingleStateHypothesisLSGWProperties{
52  1.0, 1.0, 0, std::make_shared<GmappingBaseCell>(),
53  // FIXME: move to params
54  std::make_shared<HillClimbingScanMatcher>(
56  6, 0.1, 0.1),
57  init_scan_adder(props),
59  };
60  return std::make_shared<GmappingParticleFilter>(shw_params,
62 }
63 
64 #endif
auto init_gmapping(const PropertiesProvider &props)
Definition: init_gmapping.h:49
virtual str get_str(const std::string &id, const str &dflt) const =0
auto init_spe(const PropertiesProvider &props, std::shared_ptr< OccupancyObservationProbabilityEstimator > oope)
auto init_scan_adder(const PropertiesProvider &props)
auto init_particles_nm(const PropertiesProvider &props)
Definition: init_gmapping.h:11
virtual double get_dbl(const std::string &id, double dflt) const =0
auto init_grid_map_params(const PropertiesProvider &props)
virtual unsigned get_uint(const std::string &id, unsigned dflt) const =0
auto init_gmapping_params(const PropertiesProvider &props)
Definition: init_gmapping.h:15
auto init_gmapping_prob_estimator(const PropertiesProvider &props)
Definition: init_gmapping.h:36


slam_constructor
Author(s): JetBrains Research, OSLL team
autogenerated on Mon Jun 10 2019 15:08:25