Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "cartographer/mapping/2d/tsd_value_converter.h"
00018
00019 namespace cartographer {
00020 namespace mapping {
00021
00022 TSDValueConverter::TSDValueConverter(float max_tsd, float max_weight,
00023 ValueConversionTables* conversion_tables)
00024 : max_tsd_(max_tsd),
00025 min_tsd_(-max_tsd),
00026 max_weight_(max_weight),
00027 tsd_resolution_(32766.f / (max_tsd_ - min_tsd_)),
00028 weight_resolution_(32766.f / (max_weight_ - min_weight_)),
00029 value_to_tsd_(
00030 conversion_tables->GetConversionTable(min_tsd_, min_tsd_, max_tsd_)),
00031 value_to_weight_(conversion_tables->GetConversionTable(
00032 min_weight_, min_weight_, max_weight)) {}
00033
00034 }
00035 }