Hello every one
I want to record 4 topics with time synchronization. I found [message_filter](http://wiki.ros.org/message_filters) in ROS documentation that talk about this as a following:
import message_filters
from sensor_msgs.msg import Image, CameraInfo
def callback(image, camera_info):
# Solve all of perception here...
image_sub = message_filters.Subscriber('image', Image)
info_sub = message_filters.Subscriber('camera_info', CameraInfo)
ts = message_filters.TimeSynchronizer([image_sub, info_sub], 10)
ts.registerCallback(callback)
rospy.spin()
could anyone tell me what should I put in `callback` function? should I read a previous recording bag? or I have to record a bag within this function? and If I have to record my bag inside a `callback` function what is the appropriate python command to use for the record??
↧