From 4557d9fd1233127d5e0831a6b5c82ddd3c5130a5 Mon Sep 17 00:00:00 2001 From: Wolfgang Hess Date: Thu, 13 Oct 2016 15:31:47 +0200 Subject: [PATCH] Use the simplified ToLaserFan3D function. (#112) --- cartographer_ros/cartographer_ros/sensor_bridge.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cartographer_ros/cartographer_ros/sensor_bridge.cc b/cartographer_ros/cartographer_ros/sensor_bridge.cc index 3791f8f..0f764ad 100644 --- a/cartographer_ros/cartographer_ros/sensor_bridge.cc +++ b/cartographer_ros/cartographer_ros/sensor_bridge.cc @@ -151,7 +151,7 @@ void SensorBridge::HandleLaserScanProto( const string& topic, const ::cartographer::common::Time time, const string& frame_id, 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, options_.horizontal_laser_max_range, options_.horizontal_laser_missing_echo_ray_length); @@ -162,8 +162,7 @@ void SensorBridge::HandleLaserScanProto( carto::common::make_unique<::cartographer::sensor::Data>( CheckNoLeadingSlash(frame_id), carto::sensor::TransformLaserFan3D( - carto::sensor::ToLaserFan3D(laser_fan_2d), - sensor_to_tracking->cast()))); + laser_fan, sensor_to_tracking->cast()))); } }