diff --git a/crosbot_fastslam/include/crosbot_fastslam/heightmap.hpp b/crosbot_fastslam/include/crosbot_fastslam/heightmap.hpp index 2b3f3ceb08189ca0bf6601dc4de5ffb70cfb42ff..c2a0c8dac3ba7824b89bcde05a1c86e15ae99ef7 100644 --- a/crosbot_fastslam/include/crosbot_fastslam/heightmap.hpp +++ b/crosbot_fastslam/include/crosbot_fastslam/heightmap.hpp @@ -138,7 +138,7 @@ public: // checks if a location is in this patch // NOTE: this function isn't currently used since it's more efficient not to make invalid calls // This means it hasn't been tested in use - inline bool checkWithinMap(float x, float y) { + inline bool checkWithinMap(float x, float y) __attribute__ ((deprecated)) { if ((x < xOrig) || (x >= (xOrig + width)) || (y < yOrig) || (y >= (yOrig + height))) { return false; } @@ -163,7 +163,8 @@ class HeightMultiMap : public HandledObject { public: struct SearchConstraints { public: - double maxDist, fov; + double maxDist; + double fov; Pose2D sensor; SearchConstraints() : maxDist(-1), fov(0), sensor(NAN, NAN, NAN) {} @@ -252,7 +253,9 @@ public: rval = patches[i][j]; if (rval == NULL) { - if (!create) return rval; + if (!create) { + return rval; + } // just create an empty map rval = newMap(i, j); patches[i][j] = rval; @@ -270,7 +273,8 @@ public: // returns the row (i) and column (j) of the heightmap containing x, y inline void getIJ(float x, float y, unsigned int &i, unsigned int &j) { // note: assumes the submaps are using SUB_WIDTH and SUB_HEIGHT - double ti, tj; + double ti; + double tj; tj = x - offsetX; ti = y - offsetY; @@ -284,10 +288,12 @@ public: j = (int) floor(tj); i = (int) floor(ti); - if (j == __UINT32_MAX__) + if (j == __UINT32_MAX__) { j = 0; - if (i == __UINT32_MAX__) + } + if (i == __UINT32_MAX__) { i = 0; + } } // checks if i,j is a valid heightmap