Skip to content

Commit d7554cf

Browse files
fix(log-messages): printing traffic light regulatory element id in warning messages where it is failed to receive signal and calculate stop point.
Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com>
1 parent 6c073e0 commit d7554cf

File tree

1 file changed

+3
-3
lines changed
  • planning/behavior_velocity_traffic_light_module/src

1 file changed

+3
-3
lines changed

planning/behavior_velocity_traffic_light_module/src/scene.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ 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_THROTTLE(logger_, *clock_, 5000, "Failed to calculate stop point and insert index");
202+
RCLCPP_WARN_STREAM_THROTTLE(logger_, *clock_, 5000, "Failed to calculate stop point and insert index for regulatory element id " << traffic_light_reg_elem_.id());
203203
setSafe(true);
204204
setDistance(std::numeric_limits<double>::lowest());
205205
return false;
@@ -356,9 +356,9 @@ bool TrafficLightModule::findValidTrafficSignal(TrafficSignalStamped & valid_tra
356356
const auto traffic_signal_stamped_opt = planner_data_->getTrafficSignal(
357357
traffic_light_reg_elem_.id(), true /* traffic light module keeps last observation */);
358358
if (!traffic_signal_stamped_opt) {
359-
RCLCPP_WARN_THROTTLE(
359+
RCLCPP_WARN_STREAM_THROTTLE(
360360
logger_, *clock_, 5000 /* ms */,
361-
"the traffic signal data associated with regulatory element id is not received");
361+
"the traffic signal data associated with regulatory element id " << traffic_light_reg_elem_.id() << " is not received");
362362
return false;
363363
}
364364
valid_traffic_signal = traffic_signal_stamped_opt.value();

0 commit comments

Comments
 (0)