17 #ifndef TIMESTAMP_OUTLIER_REMOVER_H 18 #define TIMESTAMP_OUTLIER_REMOVER_H 50 const auto interval = stamp -
stamp_;
51 const int scan_num = lround(interval.toSec() / interval_.toSec());
52 const double interval_remainder = remainder(interval.toSec(), interval_.toSec());
54 if (fabs(interval_remainder) > diff_max_.
toSec())
56 stamp_ += interval_ * scan_num;
57 if (outlier_cnt_ >= 1)
76 #endif // TIMESTAMP_OUTLIER_REMOVER_H
TimestampOutlierRemover(const ros::Duration &diff_max, const ros::Duration &interval)
ros::Time update(const ros::Time &stamp)
void setInterval(const ros::Duration &interval)