File tree 1 file changed +7
-3
lines changed
nav2_behavior_tree/plugins/decorator
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -72,8 +72,10 @@ inline BT::NodeStatus GoalUpdater::tick()
72
72
callback_group_executor_.spin_all (std::chrono::milliseconds (49 ));
73
73
74
74
if (last_goal_received_.header .stamp == rclcpp::Time (0 )) {
75
- // if the goal doesn't have a timestamp, we don't do any timestamp-checking and accept it
76
- setOutput (" output_goal" , last_goal_received_);
75
+ // if the goal doesn't have a timestamp, we reject it
76
+ RCLCPP_WARN (
77
+ node_->get_logger (), " The received goal has no timestamp. Ignoring." );
78
+ setOutput (" output_goal" , goal);
77
79
} else {
78
80
auto last_goal_received_time = rclcpp::Time (last_goal_received_.header .stamp );
79
81
auto goal_time = rclcpp::Time (goal.header .stamp );
@@ -101,7 +103,9 @@ inline BT::NodeStatus GoalUpdater::tick()
101
103
}
102
104
}
103
105
if (last_goals_received_time > most_recent_goal_time) {
104
- setOutput (" output_goals" , last_goals_received_.poses );
106
+ RCLCPP_WARN (
107
+ node_->get_logger (), " The received goals array has no timestamp. Ignoring." );
108
+ setOutput (" output_goals" , goals);
105
109
} else {
106
110
RCLCPP_WARN (
107
111
node_->get_logger (),
You can’t perform that action at this time.
0 commit comments