Skip to content

Commit

Permalink
chore: express meaning of threshold
Browse files Browse the repository at this point in the history
Signed-off-by: Taekjin LEE <[email protected]>
  • Loading branch information
technolojin committed May 17, 2024
1 parent d5efe10 commit 4445c45
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ void InputStream::updateTimingStatus(const rclcpp::Time & now, const rclcpp::Tim

// Update time
latest_message_time_ = now;
if (std::abs((latest_measurement_time_ - objects_time).seconds()) > 3.0) {
constexpr double delay_threshold = 3.0; // [s]
if (std::abs((latest_measurement_time_ - objects_time).seconds()) > delay_threshold) {
// Reset the latest measurement time if the time difference is too large
latest_measurement_time_ = objects_time;
RCLCPP_WARN(
Expand Down

0 comments on commit 4445c45

Please sign in to comment.