ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Make bag take two arguments, the topic name and the message, and then change that code to:

map(lambda x: x.unregister(), SUBSCRIPTIONS)
SUBSCRIPTIONS = map(lambda topic: rospy.Subscriber(topic, AnyMsg, lambda msg: bag(topic, msg)), TOPICS)