diff --git a/cartographer_ros/cartographer_ros/node_main.cc b/cartographer_ros/cartographer_ros/node_main.cc index e430af2..0a6dee3 100644 --- a/cartographer_ros/cartographer_ros/node_main.cc +++ b/cartographer_ros/cartographer_ros/node_main.cc @@ -56,8 +56,8 @@ void Run() { std::tie(node_options, trajectory_options) = LoadOptions(FLAGS_configuration_directory, FLAGS_configuration_basename); - auto map_builder = absl::make_unique( - node_options.map_builder_options); + auto map_builder = + cartographer::mapping::CreateMapBuilder(node_options.map_builder_options); Node node(node_options, std::move(map_builder), &tf_buffer, FLAGS_collect_metrics); if (!FLAGS_load_state_filename.empty()) { diff --git a/cartographer_ros/cartographer_ros/node_options.cc b/cartographer_ros/cartographer_ros/node_options.cc index 17fae24..681754e 100644 --- a/cartographer_ros/cartographer_ros/node_options.cc +++ b/cartographer_ros/cartographer_ros/node_options.cc @@ -19,7 +19,7 @@ #include #include "cartographer/common/configuration_file_resolver.h" -#include "cartographer/mapping/map_builder.h" +#include "cartographer/mapping/map_builder_interface.h" #include "glog/logging.h" namespace cartographer_ros { diff --git a/cartographer_ros/cartographer_ros/offline_node_main.cc b/cartographer_ros/cartographer_ros/offline_node_main.cc index ca593bb..7e6c3da 100644 --- a/cartographer_ros/cartographer_ros/offline_node_main.cc +++ b/cartographer_ros/cartographer_ros/offline_node_main.cc @@ -29,12 +29,11 @@ int main(int argc, char** argv) { cartographer_ros::ScopedRosLogSink ros_log_sink; - const cartographer_ros::MapBuilderFactory map_builder_factory = - [](const ::cartographer::mapping::proto::MapBuilderOptions& - map_builder_options) { - return absl::make_unique< ::cartographer::mapping::MapBuilder>( - map_builder_options); - }; + const cartographer_ros::MapBuilderFactory map_builder_factory = []( + const ::cartographer::mapping::proto::MapBuilderOptions& + map_builder_options) { + return ::cartographer::mapping::CreateMapBuilder(map_builder_options); + }; cartographer_ros::RunOfflineNode(map_builder_factory);