s/LoadMap/LoadState in node_grpc_main.cc (#744)

master
Christoph Schütte 2018-02-28 14:13:24 +01:00 committed by Wally B. Feed
parent 22261553bb
commit 24239beec8
1 changed files with 5 additions and 3 deletions

View File

@ -37,7 +37,9 @@ DEFINE_bool(
DEFINE_string( DEFINE_string(
save_map_filename, "", save_map_filename, "",
"If non-empty, serialize state and write it to disk before shutting down."); "If non-empty, serialize state and write it to disk before shutting down.");
DEFINE_string(map_filename, "", "If non-empty, filename of a map to load."); DEFINE_string(load_state_filename, "",
"If non-empty, filename of a .pbstream file "
"to load, containing a saved SLAM state.");
namespace cartographer_ros { namespace cartographer_ros {
namespace cartographer_grpc { namespace cartographer_grpc {
@ -56,8 +58,8 @@ void Run() {
::cartographer_grpc::mapping::MapBuilderStub>(FLAGS_server_address); ::cartographer_grpc::mapping::MapBuilderStub>(FLAGS_server_address);
Node node(node_options, std::move(map_builder), &tf_buffer); Node node(node_options, std::move(map_builder), &tf_buffer);
if (!FLAGS_map_filename.empty()) { if (!FLAGS_load_state_filename.empty()) {
node.LoadMap(FLAGS_map_filename); node.LoadState(FLAGS_load_state_filename, true /* load_frozen_state */);
} }
if (FLAGS_start_trajectory_with_default_topics) { if (FLAGS_start_trajectory_with_default_topics) {