ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
This will get you the center of the grid cell:
map_x_coordinate_in_meters = (gridcell_x_coordinate * map.info.resolution) +
map_.info.origin.position.x +
map.info.resolution / 2; map_y_coordinate_in_meters = (gridcell_y_coordinate * map.info.resolution) + map.info.origin.position.y + map.info.resolution/ 2;
2 | No.2 Revision |
This will get you the center of the grid cell:
map_x_coordinate_in_meters = (gridcell_x_coordinate * map.info.resolution) +
map_.info.origin.position.x +
+ map.info.resolution / 2;
3 | No.3 Revision |
This will get you the center of the grid cell:
map_x_coordinate_in_meters = (gridcell_x_coordinate * map.info.resolution) +
map_.info.origin.position.x +
map.info.resolution / 2;
map_y_coordinate_in_meters = (gridcell_y_coordinate * map.info.resolution) +
map.info.origin.position.y +
map.info.resolution/ 2;
You are correct, a grid contains a lot of "map points" and that information was lost when codifying in a lower resolution (the grid) so you can only choose where the output map point is.
4 | No.4 Revision |
This will get you the center of the grid cell:
map_x_coordinate_in_meters = (gridcell_x_coordinate * map.info.resolution) +
map_.info.origin.position.x map.info.origin.position.x +
map.info.resolution / 2;
map_y_coordinate_in_meters = (gridcell_y_coordinate * map.info.resolution) +
map.info.origin.position.y +
map.info.resolution/ 2;
You are correct, a grid contains a lot of "map points" and that information was lost when codifying in a lower resolution (the grid) so you can only choose where the output map point is.
5 | No.5 Revision |
This will get you the center of the grid cell:cel with "map" being a nav_msgs/OccupancyGridl:
map_x_coordinate_in_meters = (gridcell_x_coordinate * map.info.resolution) +
map.info.origin.position.x +
map.info.resolution / 2;
map_y_coordinate_in_meters = (gridcell_y_coordinate * map.info.resolution) +
map.info.origin.position.y +
map.info.resolution/ 2;
You are correct, a grid contains a lot of "map points" and that information was lost when codifying in a lower resolution (the grid) so you can only choose where the output map point is.
6 | No.6 Revision |
This will get you the center of the grid cel with "map" being a nav_msgs/OccupancyGridl:nav_msgs/OccupancyGrid:
map_x_coordinate_in_meters = (gridcell_x_coordinate * map.info.resolution) +
map.info.origin.position.x +
map.info.resolution / 2;
map_y_coordinate_in_meters = (gridcell_y_coordinate * map.info.resolution) +
map.info.origin.position.y +
map.info.resolution/ 2;
You are correct, a grid contains a lot of "map points" and that information was lost when codifying in a lower resolution (the grid) so you can only choose where the output map point is.
7 | No.7 Revision |
This will get you the center of the grid cel cell with "map" being a nav_msgs/OccupancyGrid:
map_x_coordinate_in_meters = (gridcell_x_coordinate * map.info.resolution) +
map.info.origin.position.x +
map.info.resolution / 2;
map_y_coordinate_in_meters = (gridcell_y_coordinate * map.info.resolution) +
map.info.origin.position.y +
map.info.resolution/ 2;
You are correct, a grid contains a lot of "map points" and that information was lost when codifying in a lower resolution (the grid) so you can only choose where the output map point is.