diff --git a/cartographer/mapping_2d/local_trajectory_builder.cc b/cartographer/mapping_2d/local_trajectory_builder.cc index 929467b..5d40196 100644 --- a/cartographer/mapping_2d/local_trajectory_builder.cc +++ b/cartographer/mapping_2d/local_trajectory_builder.cc @@ -27,12 +27,10 @@ namespace mapping_2d { proto::LocalTrajectoryBuilderOptions CreateLocalTrajectoryBuilderOptions( common::LuaParameterDictionary* const parameter_dictionary) { proto::LocalTrajectoryBuilderOptions options; - options.set_horizontal_laser_min_z( - parameter_dictionary->GetDouble("horizontal_laser_min_z")); - options.set_horizontal_laser_max_z( - parameter_dictionary->GetDouble("horizontal_laser_max_z")); - options.set_horizontal_laser_voxel_filter_size( - parameter_dictionary->GetDouble("horizontal_laser_voxel_filter_size")); + options.set_laser_min_z(parameter_dictionary->GetDouble("laser_min_z")); + options.set_laser_max_z(parameter_dictionary->GetDouble("laser_max_z")); + options.set_laser_voxel_filter_size( + parameter_dictionary->GetDouble("laser_voxel_filter_size")); options.set_use_online_correlative_scan_matching( parameter_dictionary->GetBool("use_online_correlative_scan_matching")); *options.mutable_adaptive_voxel_filter_options() = @@ -77,13 +75,13 @@ sensor::LaserFan LocalTrajectoryBuilder::BuildCroppedLaserFan( const sensor::LaserFan& laser_fan) const { const sensor::LaserFan cropped_fan = sensor::CropLaserFan( sensor::TransformLaserFan(laser_fan, tracking_to_tracking_2d), - options_.horizontal_laser_min_z(), options_.horizontal_laser_max_z()); + options_.laser_min_z(), options_.laser_max_z()); return sensor::LaserFan{ cropped_fan.origin, sensor::VoxelFiltered(cropped_fan.returns, - options_.horizontal_laser_voxel_filter_size()), + options_.laser_voxel_filter_size()), sensor::VoxelFiltered(cropped_fan.misses, - options_.horizontal_laser_voxel_filter_size())}; + options_.laser_voxel_filter_size())}; } void LocalTrajectoryBuilder::ScanMatch( diff --git a/cartographer/mapping_2d/proto/local_trajectory_builder_options.proto b/cartographer/mapping_2d/proto/local_trajectory_builder_options.proto index fdccb2d..6d2c094 100644 --- a/cartographer/mapping_2d/proto/local_trajectory_builder_options.proto +++ b/cartographer/mapping_2d/proto/local_trajectory_builder_options.proto @@ -24,13 +24,13 @@ import "cartographer/mapping_2d/scan_matching/proto/ceres_scan_matcher_options.p import "cartographer/mapping_2d/scan_matching/proto/real_time_correlative_scan_matcher_options.proto"; message LocalTrajectoryBuilderOptions { - // Cropping parameters for the horizontal laser fan. - optional float horizontal_laser_min_z = 1; - optional float horizontal_laser_max_z = 2; + // Cropping parameters for the laser fan. + optional float laser_min_z = 1; + optional float laser_max_z = 2; // Voxel filter that gets applied to the horizontal laser immediately after // cropping. - optional float horizontal_laser_voxel_filter_size = 3; + optional float laser_voxel_filter_size = 3; // Whether to solve the online scan matching first using the correlative scan // matcher to generate a good starting point for Ceres. diff --git a/configuration_files/trajectory_builder_2d.lua b/configuration_files/trajectory_builder_2d.lua index c04f537..43d6a74 100644 --- a/configuration_files/trajectory_builder_2d.lua +++ b/configuration_files/trajectory_builder_2d.lua @@ -14,9 +14,9 @@ TRAJECTORY_BUILDER_2D = { use_imu_data = true, - horizontal_laser_min_z = -0.8, - horizontal_laser_max_z = 2., - horizontal_laser_voxel_filter_size = 0.025, + laser_min_z = -0.8, + laser_max_z = 2., + laser_voxel_filter_size = 0.025, use_online_correlative_scan_matching = false, adaptive_voxel_filter = {