17 #ifndef CARTOGRAPHER_MAPPING_SUBMAPS_H_ 18 #define CARTOGRAPHER_MAPPING_SUBMAPS_H_ 23 #include "Eigen/Geometry" 28 #include "cartographer/mapping/proto/serialization.pb.h" 29 #include "cartographer/mapping/proto/submap_visualization.pb.h" 31 #include "glog/logging.h" 37 inline float Logit(
float probability) {
38 return std::log(probability / (1.f - probability));
48 254.f / (kMaxLogOdds - kMinLogOdds)) +
65 virtual void ToProto(proto::Submap* proto,
66 bool include_probability_grid_data)
const = 0;
72 proto::SubmapQuery::Response* response)
const = 0;
96 #endif // CARTOGRAPHER_MAPPING_SUBMAPS_H_
virtual void ToProto(proto::Submap *proto, bool include_probability_grid_data) const =0
int RoundToInt(const float x)
constexpr float kMinProbability
void set_num_range_data(const int num_range_data)
void set_finished(bool finished)
constexpr float kMaxProbability
Submap(const transform::Rigid3d &local_submap_pose)
float Logit(float probability)
const transform::Rigid3d local_pose_
uint8 ProbabilityToLogOddsInteger(const float probability)
transform::Rigid3d local_pose() const
virtual void ToResponseProto(const transform::Rigid3d &global_submap_pose, proto::SubmapQuery::Response *response) const =0
virtual void UpdateFromProto(const proto::Submap &proto)=0
int num_range_data() const