Handle sensor failure in message_filters::subscriber
I have a ros message_filters::subscriber
that will trigger the processing callback of Sensor1 msg at time t only if there is in a tf2_ros::buffer
data of Sensor2 with timestamp greater than t (this is needed for interpolation reasons). However, if for some reason Sensor2 fails, the processing callback will never be triggered as we will be forever waiting for a message from Sensor2 that will never arrive.
How would you handle this situation? More in particular, what do you think is the elegant/efficient way of handling such scenarios? I would be interested in a way of understanding that a sensor source has failed, and if that has failed, change the way callback is triggered (meaning if Sensor2 fails, just stop waiting for its messages and process only Sensor1 data)