Confirming data from multiple subscribers
Is there a ROS technique for ignoring subscriber generated data if it is empty or deemed incorrect ?
My robot model has 3 lasers with the possibility of more to come. My code has 3 distinct subscribers subscribing to the left, front and right lasers on my robot. The subscribers do work but I am constantly encountering issues where one or more of them returns an empty tuple. The empty tuple(s) mess up the rest of my code.
I have an if statement to check that my subscriber generated tuples are not empty but I am still encountering problems.
I’m trying to find a way of aborting empty tuples which waits for the subscribers to return some legitimate data. Can anyone help, please ?
Maybe it is a doom question, but ... how about checking data directly on the publisher side, when taking the data?