def get_image_topic(bag):
    """ Returns the name of the topic for the main camera """
    topics = bag.get_type_and_topic_info()[1].keys()
    for t in topics:
        if 'camera_node/image/compressed' in t:
            return t
    msg = 'Cannot find the topic: %s' % topics
    raise ValueError(msg)