52 double origin[3] = {0.0, 0.0, 0.0};
53 nav_msgs::GetMap::Response map_resp;
58 map_resp.map.info.origin.position.x = map_resp.map.info.width * resolution / -2;
59 map_resp.map.info.origin.position.y = map_resp.map.info.height * resolution / -2;
76 if (info_ != new_info)
79 data_.resize(info_.width * info_.height);
81 for (
unsigned int i=0; i <
data_.size(); i++)
std::string resolve_filename(const std::string &filename)
Replace a package:// prefix with the actual path to the given package.
nav_msgs::OccupancyGrid original_grid_
EasyCostmap()
Empty constructor. You need to call loadMapFromFile afterward.
std::vector< unsigned char > data_
void loadMapFromFile(nav_msgs::GetMap::Response *resp, const char *fname, double res, bool negate, double occ_th, double free_th, double *origin, MapMode mode=TRINARY)
void loadMapFromFile(const std::string &filename, const double resolution=0.1, const bool origin_at_center=false)