access message filters cache data in python
Hi all
I am suing message filters cache in my little python code but I couldn't figure out to access the cache data. It seems the python version has not function cache.getInterval(start, end).
in tutorial there is only c++ example seems to have the function but the python version doesn't.
Could anyone please tell me how can I possibly access the cache data.
Here is the is my code
class EegListener(object):
def __init__(self):
rospy.init_node('eeg_listener')
self.eeg_subscriber = message_filters.Subscriber("/eeg_signal_packet", EegPacket)
# the topick contains Header type and float64[] type
self.eeg_cache = message_filters.Cache(self.eeg_subscriber, 1280)
def callback(self,eeg_msg):
print eeg_msg.header
def listener(self):
self.eeg_cache.registerCallback(self.callback)
# self.eeg_cache.getInterval(rospy.get_rostime(),rospy.get_rostime()) does not exists !?
rospy.spin()