Skip to content

Commit a919a4b

Browse files
Ahmed Ebrahimahmeddesokyebrahim
Ahmed Ebrahim
authored andcommitted
fix(log-messages): change traffic light warning from throttle to once
Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com>
1 parent 7d7328e commit a919a4b

File tree

1 file changed

+6
-8
lines changed
  • planning/behavior_velocity_traffic_light_module/src

1 file changed

+6
-8
lines changed

planning/behavior_velocity_traffic_light_module/src/scene.cpp

+6-8
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,9 @@ bool TrafficLightModule::modifyPathVelocity(PathWithLaneId * path, StopReason *
199199
input_path, lanelet_stop_lines,
200200
planner_param_.stop_margin + planner_data_->vehicle_info_.max_longitudinal_offset_m,
201201
planner_data_->stop_line_extend_length, stop_line_point, stop_line_point_idx)) {
202-
RCLCPP_WARN_STREAM_THROTTLE(
203-
logger_, *clock_, 5000,
204-
"Failed to calculate stop point and insert index for regulatory element id "
205-
<< traffic_light_reg_elem_.id());
202+
RCLCPP_WARN_STREAM_ONCE(
203+
logger_, "Failed to calculate stop point and insert index for regulatory element id "
204+
<< traffic_light_reg_elem_.id());
206205
setSafe(true);
207206
setDistance(std::numeric_limits<double>::lowest());
208207
return false;
@@ -359,10 +358,9 @@ bool TrafficLightModule::findValidTrafficSignal(TrafficSignalStamped & valid_tra
359358
const auto traffic_signal_stamped_opt = planner_data_->getTrafficSignal(
360359
traffic_light_reg_elem_.id(), true /* traffic light module keeps last observation */);
361360
if (!traffic_signal_stamped_opt) {
362-
RCLCPP_WARN_STREAM_THROTTLE(
363-
logger_, *clock_, 5000 /* ms */,
364-
"the traffic signal data associated with regulatory element id "
365-
<< traffic_light_reg_elem_.id() << " is not received");
361+
RCLCPP_WARN_STREAM_ONCE(
362+
logger_, "the traffic signal data associated with regulatory element id "
363+
<< traffic_light_reg_elem_.id() << " is not received");
366364
return false;
367365
}
368366
valid_traffic_signal = traffic_signal_stamped_opt.value();

0 commit comments

Comments
 (0)