29 #ifndef _hectormaprepmultimap_h__ 30 #define _hectormaprepmultimap_h__ 35 #include "../map/GridMap.h" 36 #include "../map/OccGridMapUtilConfig.h" 37 #include "../matcher/ScanMatcher.h" 39 #include "../util/DrawInterface.h" 40 #include "../util/HectorDebugInfoInterface.h" 51 Eigen::Vector2i resolution(mapSizeX, mapSizeY);
53 float totalMapSizeX = mapResolution *
static_cast<float>(mapSizeX);
54 float mid_offset_x = totalMapSizeX * startCoords.x();
56 float totalMapSizeY = mapResolution *
static_cast<float>(mapSizeY);
57 float mid_offset_y = totalMapSizeY * startCoords.y();
59 for (
unsigned int i = 0; i < numDepth; ++i){
60 std::cout <<
"HectorSM map lvl " << i <<
": cellLength: " << mapResolution <<
" res x:" << resolution.x() <<
" res y: " << resolution.y() <<
"\n";
78 for (
unsigned int i = 0; i < size; ++i){
87 for (
unsigned int i = 0; i < size; ++i){
111 for (
unsigned int i = 0; i < size; ++i){
116 virtual Eigen::Vector3f
matchData(
const Eigen::Vector3f& beginEstimateWorld,
const DataContainer& dataContainer, Eigen::Matrix3f& covMatrix)
120 Eigen::Vector3f tmp(beginEstimateWorld);
122 for (
int index = size - 1; index >= 0; --index){
125 tmp = (
mapContainer[index].matchData(tmp, dataContainer, covMatrix, 5));
127 dataContainers[index-1].setFrom(dataContainer, static_cast<float>(1.0 /
pow(2.0, static_cast<double>(index))));
138 for (
unsigned int i = 0; i < size; ++i){
141 mapContainer[i].updateByScan(dataContainer, robotPoseWorld);
153 for (
unsigned int i = 0; i < size; ++i){
163 for (
unsigned int i = 0; i < size; ++i){
void setUpdateFreeFactor(float factor)
virtual void setUpdateFactorFree(float free_factor)
virtual void onMapUpdated()
MapLockerInterface * getMapMutex(int i)
virtual const GridMap & getGridMap(int mapLevel) const
virtual ~MapRepMultiMap()
virtual void setUpdateFactorOccupied(float occupied_factor)
std::vector< MapProcContainer > mapContainer
virtual int getMapLevels() const
std::vector< DataContainer > dataContainers
virtual float getScaleToMap() const
void setUpdateOccupiedFactor(float factor)
INLINE Rall1d< T, V, S > pow(const Rall1d< T, V, S > &arg, double m)
virtual void updateByScan(const DataContainer &dataContainer, const Eigen::Vector3f &robotPoseWorld)
virtual Eigen::Vector3f matchData(const Eigen::Vector3f &beginEstimateWorld, const DataContainer &dataContainer, Eigen::Matrix3f &covMatrix)
OccGridMapBase< LogOddsCell, GridMapLogOddsFunctions > GridMap
MapRepMultiMap(float mapResolution, int mapSizeX, int mapSizeY, unsigned int numDepth, const Eigen::Vector2f &startCoords, DrawInterface *drawInterfaceIn, HectorDebugInfoInterface *debugInterfaceIn)
virtual void addMapMutex(int i, MapLockerInterface *mapMutex)