runtime error from rclcpp::Time
I am getting the error terminate called after throwing an instance of 'std::runtime_error'
what(): can't compare times with different time sources
when I compare two rclcpp::Time object .
Below is the code
`
rclcpp::Time last_published_(rclcpp::Time(std::numeric_limits<rcl_time_point_value_t>::min()))
rclcpp::Time TIME_MIN = rclcpp::Time(std::numeric_limits<rcl_time_point_value_t>::min());
rclcpp::Time header_stamp = msg->header.stamp;
if (last_published_ != TIME_MIN &&
(((header_stamp - last_published_).nanoseconds()/1000*1000*1000) > 1.5 * (1.0 / expected_rate_)))
{
publish_rate_warnings_++;
}
`
Any help would be appreciated.