Skip to content

Commit

Permalink
chore(pid_longitudinal_controller): change INFO printing frequency (#…
Browse files Browse the repository at this point in the history
…5890)

Signed-off-by: Takayuki Murooka <[email protected]>
  • Loading branch information
takayuki5168 authored Dec 28, 2023
1 parent dd1579e commit 1c42fbe
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -555,9 +555,7 @@ void PidLongitudinalController::updateControlState(const ControlData & control_d
return;
};

const auto info_throttle = [this](const auto & s) {
RCLCPP_INFO_SKIPFIRST_THROTTLE(logger_, *clock_, 5000, "%s", s);
};
const auto info_once = [this](const auto & s) { RCLCPP_INFO_ONCE(logger_, "%s", s); };

const bool is_under_control = m_current_operation_mode.is_autoware_control_enabled &&
m_current_operation_mode.mode == OperationModeState::AUTONOMOUS;
Expand Down Expand Up @@ -623,10 +621,10 @@ void PidLongitudinalController::updateControlState(const ControlData & control_d
if (m_control_state == ControlState::STOPPED) {
// -- debug print --
if (has_nonzero_target_vel && !departure_condition_from_stopped) {
info_throttle("target speed > 0, but departure condition is not met. Keep STOPPED.");
info_once("target speed > 0, but departure condition is not met. Keep STOPPED.");
}
if (has_nonzero_target_vel && keep_stopped_condition) {
info_throttle("target speed > 0, but keep stop condition is met. Keep STOPPED.");
info_once("target speed > 0, but keep stop condition is met. Keep STOPPED.");
}
// ---------------

Expand Down

0 comments on commit 1c42fbe

Please sign in to comment.