Function husarion_ugv_utils::ros::VerifyTimestampGap
Defined in File ros_utils.hpp
Function Documentation
-
void husarion_ugv_utils::ros::VerifyTimestampGap(const std_msgs::msg::Header &header_1, const std_msgs::msg::Header &header_2, std::chrono::seconds max_timestamp_gap)
Verifies the timestamp gap between two headers and throws an exception if the gap exceeds the maximum allowed gap.
- Parameters:
header_1 – The first header containing the timestamp.
header_2 – The second header containing the timestamp.
max_timestamp_gap – The maximum allowed timestamp gap in seconds.
- Throws:
<tt>std::runtime_error</tt> – If either of the timestamps is not set or if the timestamp gap exceeds the maximum allowed gap.