MCPcopy Create free account
hub / github.com/EdwardLiuyc/StaticMapping / main

Function main

ros_node/join_maps_node.cpp:26–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24#include "builder/multi_trajectory_map_builder.h"
25
26int main(int argc, char** argv) {
27 std::string base_map_file = "";
28 pcl::console::parse_argument(argc, argv, "-b", base_map_file);
29 if (base_map_file.empty()) {
30 PRINT_ERROR("you should use \"-b filename\" to specify the basemap xml. ");
31 return -1;
32 }
33
34 std::string incremental_map_file = "";
35 pcl::console::parse_argument(argc, argv, "-i", incremental_map_file);
36 if (incremental_map_file.empty()) {
37 PRINT_ERROR(
38 "you should use \"-i filename\" to specify the incremental map xml. ");
39 return -1;
40 }
41
42 std::string new_map_file = "";
43 pcl::console::parse_argument(argc, argv, "-n", new_map_file);
44 if (new_map_file.empty()) {
45 PRINT_ERROR("you should use \"-n filename\" to specify the new map xml. ");
46 return -1;
47 }
48
49 static_map::MultiTrajectoryMapBuilderOptions options;
50 options.loop_dettect_settings.use_gps = false;
51 options.loop_dettect_settings.max_close_loop_distance = 10.;
52 options.loop_dettect_settings.nearest_history_pos_num = 3;
53
54 static_map::MultiTrajectoryMapBuilder builder(options);
55
56 builder.LoadBaseMap(base_map_file);
57 builder.LoadIncrementalMap(incremental_map_file);
58 builder.SaveWholeMap(new_map_file);
59 // builder.GenerateWholeMapPcd("2map.pcd");
60 builder.GenerateStaticMap("2map_static.pcd");
61 return 0;
62}

Callers

nothing calls this directly

Calls 5

LoadBaseMapMethod · 0.80
LoadIncrementalMapMethod · 0.80
SaveWholeMapMethod · 0.80
GenerateStaticMapMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected