17 #ifndef CARTOGRAPHER_MAPPING_2D_MAP_LIMITS_H_ 18 #define CARTOGRAPHER_MAPPING_2D_MAP_LIMITS_H_ 24 #include "Eigen/Geometry" 27 #include "cartographer/mapping/proto/2d/map_limits.pb.h" 33 #include "glog/logging.h" 50 explicit MapLimits(
const proto::MapLimits& map_limits)
61 const Eigen::Vector2d&
max()
const {
return max_; }
73 return Eigen::Array2i(
79 bool Contains(
const Eigen::Array2i& cell_index)
const {
80 return (Eigen::Array2i(0, 0) <= cell_index).all() &&
93 proto::MapLimits result;
94 result.set_resolution(map_limits.
resolution());
103 #endif // CARTOGRAPHER_MAPPING_2D_MAP_LIMITS_H_
const Eigen::Vector2d & max() const
MapLimits(const double resolution, const Eigen::Vector2d &max, const CellLimits &cell_limits)
double resolution() const
int RoundToInt(const float x)
bool Contains(const Eigen::Array2i &cell_index) const
Eigen::Array2i GetCellIndex(const Eigen::Vector2f &point) const
proto::MapLimits ToProto(const MapLimits &map_limits)
const CellLimits & cell_limits() const
MapLimits(const proto::MapLimits &map_limits)