Skip to content

Commit

Permalink
timed_behaviour: pass through on_run_result.error_msg (ros-navigation…
Browse files Browse the repository at this point in the history
…#4341)

Signed-off-by: Mike Wake <michael.wake@aosgrp.com.au>
  • Loading branch information
aosmw authored and ewak committed Feb 11, 2025
1 parent 5f274b9 commit c323597
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nav2_behaviors/include/nav2_behaviors/timed_behavior.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ class TimedBehavior : public nav2_core::Behavior
ResultStatus on_run_result = onRun(action_server_->get_current_goal());
if (on_run_result.status != Status::SUCCEEDED) {
result->error_code = on_run_result.error_code;
result->error_msg = "Initial checks failed for " + behavior_name_ + " - " +
on_run_result.error_msg;
RCLCPP_INFO(logger_, result->error_msg.c_str());
result->error_msg = on_run_result.error_msg;
RCLCPP_INFO(logger_, "Initial checks failed for %s - %s", behavior_name_.c_str(),
on_run_result.error_msg.c_str());
action_server_->terminate_current(result);
return;
}
Expand Down

0 comments on commit c323597

Please sign in to comment.