Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "cartographer/mapping/map_builder.h"
00018 #include "cartographer_ros/offline_node.h"
00019 #include "cartographer_ros/ros_log_sink.h"
00020 #include "gflags/gflags.h"
00021 #include "ros/ros.h"
00022
00023 int main(int argc, char** argv) {
00024 google::InitGoogleLogging(argv[0]);
00025 google::ParseCommandLineFlags(&argc, &argv, true);
00026
00027 ::ros::init(argc, argv, "cartographer_offline_node");
00028 ::ros::start();
00029
00030 cartographer_ros::ScopedRosLogSink ros_log_sink;
00031
00032 const cartographer_ros::MapBuilderFactory map_builder_factory =
00033 [](const ::cartographer::mapping::proto::MapBuilderOptions&
00034 map_builder_options) {
00035 return absl::make_unique< ::cartographer::mapping::MapBuilder>(
00036 map_builder_options);
00037 };
00038
00039 cartographer_ros::RunOfflineNode(map_builder_factory);
00040
00041 ::ros::shutdown();
00042 }