fixed casting of high_resolution_max_range (SubmapsOptions3D) (#1239)

Fixed unintentional casting of high_resolution_max_range from double to int, to float

In SubmapsOptions3D the parameter "high_resolution_max_range" is defined as double. In the code it gets casted to int when calling Submap3D::InsertRangeData and to float when calling FilterRangeDataByMaxRange.
master
Martin Schwörer 2018-07-06 11:02:38 +02:00 committed by Wally B. Feed
parent 627ebb39b9
commit 902459e95c
2 changed files with 2 additions and 2 deletions

View File

@ -261,7 +261,7 @@ void Submap3D::ToResponseProto(
void Submap3D::InsertRangeData(const sensor::RangeData& range_data,
const RangeDataInserter3D& range_data_inserter,
const int high_resolution_max_range) {
const float high_resolution_max_range) {
CHECK(!finished());
const sensor::RangeData transformed_range_data = sensor::TransformRangeData(
range_data, local_pose().inverse().cast<float>());

View File

@ -64,7 +64,7 @@ class Submap3D : public Submap {
// submap must not be finished yet.
void InsertRangeData(const sensor::RangeData& range_data,
const RangeDataInserter3D& range_data_inserter,
int high_resolution_max_range);
float high_resolution_max_range);
void Finish();
private: