From c54879817a96de375720dbe432c02e42dfc46772 Mon Sep 17 00:00:00 2001 From: danimtb Date: Thu, 28 Nov 2024 13:46:57 +0100 Subject: [PATCH] update --- .../ros/rosenv/navigation_ws/navigation_package/CMakeLists.txt | 2 +- .../navigation_package/src/{main.cpp => navigator.cpp} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename examples/tools/ros/rosenv/navigation_ws/navigation_package/src/{main.cpp => navigator.cpp} (95%) diff --git a/examples/tools/ros/rosenv/navigation_ws/navigation_package/CMakeLists.txt b/examples/tools/ros/rosenv/navigation_ws/navigation_package/CMakeLists.txt index dda1312..b57b539 100644 --- a/examples/tools/ros/rosenv/navigation_ws/navigation_package/CMakeLists.txt +++ b/examples/tools/ros/rosenv/navigation_ws/navigation_package/CMakeLists.txt @@ -15,7 +15,7 @@ find_package(nav2_msgs REQUIRED) # Conan dependencies find_package(yaml-cpp REQUIRED) -add_executable(navigator src/main.cpp) +add_executable(navigator src/navigator.cpp) target_compile_features(navigator PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17 ament_target_dependencies(navigator rclcpp rclcpp_action nav2_msgs yaml-cpp) diff --git a/examples/tools/ros/rosenv/navigation_ws/navigation_package/src/main.cpp b/examples/tools/ros/rosenv/navigation_ws/navigation_package/src/navigator.cpp similarity index 95% rename from examples/tools/ros/rosenv/navigation_ws/navigation_package/src/main.cpp rename to examples/tools/ros/rosenv/navigation_ws/navigation_package/src/navigator.cpp index c663d6f..4b2712f 100644 --- a/examples/tools/ros/rosenv/navigation_ws/navigation_package/src/main.cpp +++ b/examples/tools/ros/rosenv/navigation_ws/navigation_package/src/navigator.cpp @@ -60,7 +60,7 @@ class YamlNavigationNode : public rclcpp::Node { void sendAllGoals() { for (const auto &location : locations_) { - RCLCPP_INFO(this->get_logger(), "Sending goal to %s: (%.2f, %.2f)", location.name.c_str(), location.x, location.y); + RCLCPP_INFO(this->get_logger(), "Sending %s goal (%.2f, %.2f) to robot", location.name.c_str(), location.x, location.y); auto goal_msg = NavigateToPose::Goal(); goal_msg.pose.header.frame_id = "map";