Subscribing to topic periodically?
Hi,
I'm a bit new to ROS. I want to subscribe to a topic that is being published continuously. But I only want to read the message once in a while. And I want to read the most recent message at that time.
Is it best to use a pub-sub and get the subscriber node to only obtain the messages at a certain time? Or is the better alternative to define a rosservice?
Thank you.
look into TimeSequencer http://docs.ros.org/api/message_filters/html/c++/classmessage__filters_1_1TimeSequencer.html