gmapping
/build/rock-master-18.09-slam-orogen-gmapping-0.20171014/gmappingTypes.hpp
Go to the documentation of this file.
1 #ifndef gmapping_TYPES_HPP
2 #define gmapping_TYPES_HPP
3 
4 /* If you need to define types specific to your oroGen components, define them
5  * here. Required headers must be included explicitly
6  *
7  * However, it is common that you will only import types from your library, in
8  * which case you do not need this file
9  */
10 
11 #include <string>
12 #include <base/Time.hpp>
13 #include <base/Pose.hpp>
14 #include <vector>
15 
16 namespace gmapping {
17 
18  struct Config {
19  bool inverted_laser; // (bool, default: false)
20  //
21  int throttle_scans; // (int, default: 1)
22  // Process 1 out of every this many scans (set it to a higher number to skip more scans)
23  std::string laser_frame; // (string, default: "laser")
24  // The frame attached to the laser.
25  std::string base_frame; // (string, default: "base_link")
26  // The frame attached to the mobile base.
27  std::string map_frame; // (string, default: "map")
28  // The frame attached to the map.
29  std::string odom_frame; // (string, default: "odom")
30  // The frame attached to the odometry system.
31  float map_update_interval; // (float, default: 5.0)
32  // How long (in seconds) between updates to the map. Lowering this number updates the occupancy grid more often, at the expense of greater computational load.
33  float maxUrange; // (float, default: 80.0)
34  // The maximum usable range of the laser. A beam is cropped to this value.
35  float sigma; // (float, default: 0.05)
36  // The sigma used by the greedy endpoint matching
37  int kernelSize; // (int, default: 1)
38  // The kernel in which to look for a correspondence
39  float lstep; // (float, default: 0.05)
40  // The optimization step in translation
41  float astep; // (float, default: 0.05)
42  // The optimization step in rotation
43  int iterations; // (int, default: 5)
44  // The number of iterations of the scanmatcher
45  float lsigma; // (float, default: 0.075)
46  // The sigma of a beam used for likelihood computation
47  float ogain; // (float, default: 3.0)
48  // Gain to be used while evaluating the likelihood, for smoothing the resampling effects
49  int lskip; // (int, default: 0)
50  // Number of beams to skip in each scan.
51  float srr; // (float, default: 0.1)
52  // Odometry error in translation as a function of translation (rho/rho)
53  float srt; // (float, default: 0.2)
54  // Odometry error in translation as a function of rotation (rho/theta)
55  float str; // (float, default: 0.1)
56  // Odometry error in rotation as a function of translation (theta/rho)
57  float stt; // (float, default: 0.2)
58  // Odometry error in rotation as a function of rotation (theta/theta)
59  float linearUpdate; // (float, default: 1.0)
60  // Process a scan each time the robot translates this far
61  float angularUpdate; // (float, default: 0.5)
62  // Process a scan each time the robot rotates this far
63  float temporalUpdate; // (float, default: -1.0)
64  // Process a scan if the last scan proccessed is older than the update time in seconds. A value less than zero will turn time based updates off.
65  float resampleThreshold; // (float, default: 0.5)
66  // The Neff based resampling threshold
67  int particles; // (int, default: 30)
68  // Number of particles in the filter
69  float xmin; // (float, default: -100.0)
70  // Initial map size
71  float ymin; // (float, default: -100.0)
72  // Initial map size
73  float xmax; // (float, default: 100.0)
74  // Initial map size
75  float ymax; // (float, default: 100.0)
76  // Initial map size
77  float delta; // (float, default: 0.05)
78  // Processing parameters (resolution of the map)
79  float llsamplerange; // (float, default: 0.01)
80  // Translational sampling range for the likelihood
81  float llsamplestep; // (float, default: 0.01)
82  // Translational sampling step for the likelihood
83  float lasamplerange; // (float, default: 0.005)
84  // Angular sampling range for the likelihood
85  float lasamplestep; // (float, default: 0.005)
86  // Angular sampling step for the likelihood
87  float transform_publish_period; // (float, default: 0.05)
88  // How long (in seconds) between transform publications.
89  float occ_thresh; // (float, default: 0.25)
90  // Threshold on gmapping's occupancy values. Cells with greater occupancy are considered occupied (i.e., set to 100 in the resulting sensor_msgs/LaserScan). New in 1.1.0.
91  float maxRange; //(float, default: NULL)
92  // The maximum range of the sensor. If regions with no obstacles within the range of the sensor should appear as free space in the map, set maxUrange < maximum range of the real sensor <= maxRange.
93  Config() : inverted_laser(false)
94  , throttle_scans(1)
95  , laser_frame("laser")
96  , base_frame("base_link")
97  , map_frame("map")
98  , odom_frame("odom")
99  , map_update_interval(1.0)
100  , maxUrange(60.0)
101  , sigma(0.05)
102  , kernelSize(1)
103  , lstep(0.05)
104  , astep(0.05)
105  , iterations(5)
106  , lsigma(0.075)
107  , ogain(3.0)
108  , lskip(0)
109  , srr(0.1)
110  , srt(0.2)
111  , str(0.1)
112  , stt(0.2)
113  , linearUpdate(0.5)
114  , angularUpdate(0.2)
115  , temporalUpdate(-1.0)
116  , resampleThreshold(0.5)
117  , particles(30)
118  , xmin(-25.0) // -100.0
119  , ymin(-25.0)
120  , xmax(25.0)
121  , ymax(25.0)
122  , delta(0.05)
123  , llsamplerange(0.01)
124  , llsamplestep(0.01)
125  , lasamplerange(0.005)
126  , lasamplestep(0.005)
127  , transform_publish_period(0.05)
128  , occ_thresh(0.25)
129  , maxRange(60.0) {}
130  };
131 
132 
134  {
135  base::Time stamp;
136  std::string frame_id;
137  base::Time map_load_time;
138  float resolution;
139  uint32_t height;
140  uint32_t width;
141  base::Pose origin;
142  std::vector<uint8_t> data;
143  };
144 
145 
146  /* wrapper for base::samples::LaserScan as it doesnot support floating range values */
147  struct Laser
148  {
149  base::Time time;
150  double start_angle;
152  std::vector<double> ranges;
153  double minRange;
154  double maxRange;
155  };
156 
157 
158 }
159 
160 #endif
161 
uint32_t height
Definition: gmappingTypes.hpp:139
float angularUpdate
Definition: gmappingTypes.hpp:61
float map_update_interval
Definition: gmappingTypes.hpp:31
float llsamplestep
Definition: gmappingTypes.hpp:81
double maxRange
Definition: gmappingTypes.hpp:154
float linearUpdate
Definition: gmappingTypes.hpp:59
int iterations
Definition: gmappingTypes.hpp:43
float lasamplerange
Definition: gmappingTypes.hpp:83
float xmax
Definition: gmappingTypes.hpp:73
float xmin
Definition: gmappingTypes.hpp:69
std::vector< double > ranges
Definition: gmappingTypes.hpp:152
Config()
Definition: gmappingTypes.hpp:93
std::string frame_id
Definition: gmappingTypes.hpp:136
double angular_resolution
Definition: gmappingTypes.hpp:151
float ymax
Definition: gmappingTypes.hpp:75
std::vector< uint8_t > data
Definition: gmappingTypes.hpp:142
uint32_t width
Definition: gmappingTypes.hpp:140
double minRange
Definition: gmappingTypes.hpp:153
int lskip
Definition: gmappingTypes.hpp:49
base::Pose origin
Definition: gmappingTypes.hpp:141
float resolution
Definition: gmappingTypes.hpp:138
float occ_thresh
Definition: gmappingTypes.hpp:89
float stt
Definition: gmappingTypes.hpp:57
Definition: gmappingTypes.hpp:147
float astep
Definition: gmappingTypes.hpp:41
float ymin
Definition: gmappingTypes.hpp:71
float temporalUpdate
Definition: gmappingTypes.hpp:63
int throttle_scans
Definition: gmappingTypes.hpp:21
Definition: gmappingTypes.hpp:16
float ogain
Definition: gmappingTypes.hpp:47
float lsigma
Definition: gmappingTypes.hpp:45
bool inverted_laser
Definition: gmappingTypes.hpp:19
float delta
Definition: gmappingTypes.hpp:77
float lasamplestep
Definition: gmappingTypes.hpp:85
base::Time map_load_time
Definition: gmappingTypes.hpp:137
float llsamplerange
Definition: gmappingTypes.hpp:79
float srr
Definition: gmappingTypes.hpp:51
int particles
Definition: gmappingTypes.hpp:67
std::string odom_frame
Definition: gmappingTypes.hpp:29
float str
Definition: gmappingTypes.hpp:55
base::Time stamp
Definition: gmappingTypes.hpp:135
float srt
Definition: gmappingTypes.hpp:53
float lstep
Definition: gmappingTypes.hpp:39
float transform_publish_period
Definition: gmappingTypes.hpp:87
std::string laser_frame
Definition: gmappingTypes.hpp:23
std::string base_frame
Definition: gmappingTypes.hpp:25
double start_angle
Definition: gmappingTypes.hpp:150
base::Time time
Definition: gmappingTypes.hpp:149
float resampleThreshold
Definition: gmappingTypes.hpp:65
Definition: gmappingTypes.hpp:133
float sigma
Definition: gmappingTypes.hpp:35
int kernelSize
Definition: gmappingTypes.hpp:37
Definition: gmappingTypes.hpp:18
float maxUrange
Definition: gmappingTypes.hpp:33
std::string map_frame
Definition: gmappingTypes.hpp:27
float maxRange
Definition: gmappingTypes.hpp:91