ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Here is the error:
currentPoint = map.data[grid_x * grid_y];
I suppose currentPoint
should be calculated as follows:
currentPoint = map.data[grid_x * `mapWidth` + grid_y];
or
currentPoint = map.data[grid_y * `mapWidth` + grid_x];
depending on your orientation.
2 | No.2 Revision |
Here is the error:
currentPoint = map.data[grid_x * grid_y];
I suppose currentPoint
should be calculated as follows:
currentPoint = map.data[grid_x * `mapWidth` mapWidth + grid_y];
or
currentPoint = map.data[grid_y * `mapWidth` mapWidth + grid_x];
depending on your orientation.
3 | No.3 Revision |
Here is the error:
currentPoint = map.data[grid_x * grid_y];
I suppose believe currentPoint
should be calculated as follows:
currentPoint = map.data[grid_x * mapWidth + grid_y];
or
currentPoint = map.data[grid_y * mapWidth + grid_x];
depending on your orientation.orientation. mapWidth
:
mapWidth = map.info.width;
4 | No.4 Revision |
Here is the error:
currentPoint = map.data[grid_x * grid_y];
I believe currentPoint
should be calculated as follows:
currentPoint = map.data[grid_x * mapWidth + grid_y];
or
currentPoint = map.data[grid_y * mapWidth + grid_x];
depending on your orientation. By the way, you can get mapWidth
: as follows:
mapWidth = map.info.width;