37 MAP_CELL_KEEP_OUT = 1,
38 MAP_CELL_TEMPORARY_OBSTACLE = 2,
39 MAP_CELL_ENLARGED_OBSTACLE = 3,
49 double m_occupied_thresh;
55 bool m_compressed_data_over_network;
58 bool enable_map_compression_over_network(
bool val);
62 void enlargeCell(
XYCell cell);
65 CellFlagData PixelToCellFlagData(
const yarp::sig::PixelRgb& pixin)
const;
66 yarp::sig::PixelRgb CellFlagDataToPixel(
const CellFlagData& cellin)
const;
73 bool loadMapYarpOnly(std::string yarp_img_filename);
74 bool loadMapROSOnly(std::string ros_yaml_filename);
75 bool loadROSParams(std::string ros_yaml_filename, std::string& pgm_occ_filename,
double& resolution,
double& orig_x,
double& orig_y,
double& orig_t);
76 bool loadMapYarpAndRos(std::string yarp_img_filename, std::string ros_yaml_filename);
88 bool isWall(
XYCell cell)
const;
95 bool isFree(
XYCell cell)
const;
102 bool isNotFree(
XYCell cell)
const;
110 bool isKeepOut(
XYCell cell)
const;
129 void clearMapTemporaryFlags();
136 bool setOccupancyData(
XYCell cell,
double occupancy);
143 bool getOccupancyData(
XYCell cell,
double& occupancy)
const;
155 bool setOrigin(
double x,
double y,
double theta);
161 void getOrigin(
double& x,
double& y,
double& theta)
const;
168 bool setResolution(
double resolution);
174 void getResolution(
double& resolution)
const;
181 bool setSize_in_meters(
double x,
double y);
188 bool setSize_in_cells(
size_t x,
size_t y);
194 void getSize_in_meters(
double& x,
double& y)
const;
200 void getSize_in_cells(
size_t& x,
size_t& y)
const;
206 size_t width()
const;
212 size_t height()
const;
219 bool setMapName(std::string map_name);
225 std::string getMapName()
const;
234 bool crop(
int left,
int top,
int right,
int bottom);
242 bool isInsideMap(
XYCell cell)
const;
249 bool isInsideMap(
XYWorld world)
const;
256 bool isIdenticalTo(
const MapGrid2D& otherMap)
const;
265 bool enlargeObstacles(
double size);
274 bool loadFromFile(std::string map_filename);
281 bool saveToFile(std::string map_filename)
const;