Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ROS yaml-cpp example for blogpost #168

Merged
merged 14 commits into from
Nov 28, 2024
Prev Previous commit
Next Next commit
update
danimtb committed Nov 28, 2024
commit c54879817a96de375720dbe432c02e42dfc46772
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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";