Hi,
visual odometry node would continue to publish the odometry message (if "publish_null_when_lost" is true, the default) with all 0 matrix when lost. You can detect it is not lost anymore if this matrix has non-zero values. Another way is to subscribe to odom_info topic, which will tell you if the odometry is lost or not, see
lost member.
cheers,
Mathieu