17 #ifndef CARTOGRAPHER_MAPPING_2D_MAP_LIMITS_H_ 18 #define CARTOGRAPHER_MAPPING_2D_MAP_LIMITS_H_ 24 #include "Eigen/Geometry" 27 #include "cartographer/mapping_2d/proto/map_limits.pb.h" 33 #include "glog/logging.h" 36 namespace mapping_2d {
50 explicit MapLimits(
const proto::MapLimits& map_limits)
61 const Eigen::Vector2d&
max()
const {
return max_; }
70 const double y)
const {
74 return Eigen::Array2i(
80 bool Contains(
const Eigen::Array2i& xy_index)
const {
81 return (Eigen::Array2i(0, 0) <= xy_index).all() &&
94 proto::MapLimits result;
95 result.set_resolution(map_limits.
resolution());
104 #endif // CARTOGRAPHER_MAPPING_2D_MAP_LIMITS_H_
const Eigen::Vector2d & max() const
int RoundToInt(const float x)
MapLimits(const proto::MapLimits &map_limits)
Eigen::Array2i GetXYIndexOfCellContainingPoint(const double x, const double y) const
double resolution() const
const CellLimits & cell_limits() const
bool Contains(const Eigen::Array2i &xy_index) const
proto::MapLimits ToProto(const MapLimits &map_limits)
MapLimits(const double resolution, const Eigen::Vector2d &max, const CellLimits &cell_limits)