Skip to content

Commit

Permalink
Converted to transient local subscription for map saver (SteveMacensk…
Browse files Browse the repository at this point in the history
…i#228)

* Converted to transient local subscription for map saver

* fixed typo to get building correctly
  • Loading branch information
Michael-Equi authored Jul 14, 2020
1 parent a6cc876 commit 3695c21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/map_saver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ bool MapSaver::saveMapCallback(
if (name != "") {
RCLCPP_INFO(node_->get_logger(),
"SlamToolbox: Saving map as %s.", name.c_str());
int rc = system(("ros2 run nav2_map_server map_saver_cli -f " + name).c_str());
int rc = system(("ros2 run nav2_map_server map_saver_cli -f " + name + " --ros-args -p map_subscribe_transient_local:=true").c_str());
} else {
RCLCPP_INFO(node_->get_logger(),
"SlamToolbox: Saving map in current directory.");
int rc = system("ros2 run nav2_map_server map_saver_cli");
int rc = system("ros2 run nav2_map_server map_saver_cli --ros-args -p map_subscribe_transient_local:=true");
}

rclcpp::sleep_for(std::chrono::seconds(1));
Expand Down

0 comments on commit 3695c21

Please sign in to comment.