Use the simplified ToLaserFan3D function. (#112)

master
Wolfgang Hess 2016-10-13 15:31:47 +02:00 committed by GitHub
parent 90872f3697
commit 4557d9fd12
1 changed files with 2 additions and 3 deletions

View File

@ -151,7 +151,7 @@ void SensorBridge::HandleLaserScanProto(
const string& topic, const ::cartographer::common::Time time, const string& topic, const ::cartographer::common::Time time,
const string& frame_id, const string& frame_id,
const ::cartographer::sensor::proto::LaserScan& laser_scan) { const ::cartographer::sensor::proto::LaserScan& laser_scan) {
const auto laser_fan_2d = carto::sensor::ToLaserFan( const auto laser_fan = carto::sensor::ToLaserFan3D(
laser_scan, options_.horizontal_laser_min_range, laser_scan, options_.horizontal_laser_min_range,
options_.horizontal_laser_max_range, options_.horizontal_laser_max_range,
options_.horizontal_laser_missing_echo_ray_length); options_.horizontal_laser_missing_echo_ray_length);
@ -162,8 +162,7 @@ void SensorBridge::HandleLaserScanProto(
carto::common::make_unique<::cartographer::sensor::Data>( carto::common::make_unique<::cartographer::sensor::Data>(
CheckNoLeadingSlash(frame_id), CheckNoLeadingSlash(frame_id),
carto::sensor::TransformLaserFan3D( carto::sensor::TransformLaserFan3D(
carto::sensor::ToLaserFan3D(laser_fan_2d), laser_fan, sensor_to_tracking->cast<float>())));
sensor_to_tracking->cast<float>())));
} }
} }