30 #ifndef _MIRA_OCCUPANCYGRIDMAPPING_H_ 31 #define _MIRA_OCCUPANCYGRIDMAPPING_H_ 34 #include <robot/RangeScan.h> 42 namespace mira {
namespace maps {
79 const robot::RangeScan& scan,
float maxRange = 5.0f)
81 insertScan(map, pose, pose, scan, maxRange);
99 const robot::RangeScan& scan,
float maxRange = 5.0f);
121 mSensorReliabilitySigma = sigma;
122 invalidateReliabilityLUT();
129 return mSensorReliabilitySigma;
144 mMaxEstimationOccupancy = max;
145 mMinEstimationOccupancy = min;
152 mMinEstimationOccupancy = min;
155 return mMinEstimationOccupancy;
163 mMaxEstimationOccupancy = max;
166 return mMaxEstimationOccupancy;
180 void setMapOccupancyLimits(
uint8 min,
uint8 max);
186 setMapOccupancyLimits(min, mMaxMapOccupancy);
189 return mMinMapOccupancy;
197 setMapOccupancyLimits(mMinMapOccupancy, max);
200 return mMaxMapOccupancy;
209 void setEnsureOccupancyLimitsAfterUpdate(
bool enable);
212 return mEnsureOccupancyLimitsAfterUpdate;
225 mLocalCropRadius = localRadius;
228 return mLocalCropRadius;
236 mMinCertainty = certainty;
240 return mMinCertainty;
245 template <
bool useReliability,
bool freeOnly>
248 template <
bool useReliability,
bool freeOnly>
249 friend class Visitor;
253 template<
bool useReliability>
256 const robot::RangeScan& scan,
float maxRange);
262 uint8 mMaxEstimationOccupancy;
263 uint8 mMinEstimationOccupancy;
264 uint8 mMaxMapOccupancy;
265 uint8 mMinMapOccupancy;
266 bool mEnsureOccupancyLimitsAfterUpdate;
268 float mSensorReliabilitySigma;
270 float mLocalCropRadius;
286 uint8 mBayesLUT[256][256];
287 void buildBayesLUT();
289 enum { RELIABILITY_LUT_RESOLUTION = 1024 };
290 std::vector<uint8> mReliabilityLUT;
291 uint8 getReliability(
float d)
const;
293 void buildReliabilityLUT(
float max_d);
294 void invalidateReliabilityLUT();
bool getEnsureOccupancyLimitsAfterUpdate() const
Definition: OccupancyGridMapping.h:211
float getMinCertainty() const
Definition: OccupancyGridMapping.h:239
void setMinOccupancyLimit(uint8 min)
Sets the minimum occupancy in the map.
Definition: OccupancyGridMapping.h:185
uint8 getMinEstimationOccupancyLimit() const
Definition: OccupancyGridMapping.h:154
uint8 getMaxEstimationOccupancyLimit() const
Definition: OccupancyGridMapping.h:165
float getSensorReliabilitySigma() const
Returns the sigma for distance reliability function.
Definition: OccupancyGridMapping.h:128
uint8 getMaxOccupancyLimit() const
Definition: OccupancyGridMapping.h:199
Mapping export macro declaration.
void setSensorReliabilitySigma(float sigma)
Set sigma for distance reliability function.
Definition: OccupancyGridMapping.h:120
Inserts range scan into an occupancy map.
Definition: OccupancyGridMapping.h:60
float getLocalCropRadius() const
Definition: OccupancyGridMapping.h:227
void setEstimationOccupancyLimits(uint8 min, uint8 max)
Set the occupancy limits for current estimation.
Definition: OccupancyGridMapping.h:143
void setMaxEstimationOccupancyLimit(uint8 max)
Sets the maximum occupancy estimated for current observation.
Definition: OccupancyGridMapping.h:162
void setLocalCropRadius(float localRadius)
Sets the local cropping radius for mapping.
Definition: OccupancyGridMapping.h:224
void setMinEstimationOccupancyLimit(uint8 min)
Sets the minimum occupancy estimated for current observation.
Definition: OccupancyGridMapping.h:151
void insertScan(OccupancyGrid &map, const Pose3 &pose, const robot::RangeScan &scan, float maxRange=5.0f)
Inserts a range scan into the specified occupancy map at the specified robot pose.
Definition: OccupancyGridMapping.h:78
void setMinCertainty(float certainty)
Sets the minimum certainty a scan must have to be taken into account.
Definition: OccupancyGridMapping.h:235
uint8 getMinOccupancyLimit() const
Definition: OccupancyGridMapping.h:188
void setMaxOccupancyLimit(uint8 max)
Sets the maximum occupancy in the map.
Definition: OccupancyGridMapping.h:196
#define MIRA_MAPPING_MAPPING_EXPORT
Definition: MappingExports.h:44
Occupancy grid definition.