Skip to content
Snippets Groups Projects
Commit a230a4f4 authored by Timothy Wiley's avatar Timothy Wiley
Browse files

crosbot_fastslam: deprecate un-used function, and more code cleanup

parent d54b6552
Branches
No related tags found
No related merge requests found
......@@ -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,11 +288,13 @@ 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
inline bool valid(unsigned int i, unsigned int j) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment