ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
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)