Skip to content

Commit

Permalink
chore(control_validator): use throttle for the error log (autowarefou…
Browse files Browse the repository at this point in the history
…ndation#4960)

Signed-off-by: Takamasa Horibe <[email protected]>
  • Loading branch information
TakaHoribe authored Sep 12, 2023
1 parent 8798d5c commit 3e28ab5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion control/control_validator/src/control_validator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ void ControlValidator::publishDebugInfo()
void ControlValidator::validate(const Trajectory & predicted_trajectory)
{
if (predicted_trajectory.points.size() < 2) {
RCLCPP_ERROR(get_logger(), "predicted_trajectory size is less than 2. Cannot validate.");
RCLCPP_ERROR_THROTTLE(
get_logger(), *get_clock(), 1000,
"predicted_trajectory size is less than 2. Cannot validate.");
return;
}

Expand Down

0 comments on commit 3e28ab5

Please sign in to comment.