def __record_bus()

in a2d2/src/rosbag_producer.py [0:0]


    def __record_bus(self, manifest=None,  ros_topic=None, frame_id=None):

        self.bus_topic = ros_topic 
        while True:
            rows = None
            while not rows and manifest.is_open():
                rows = manifest.fetch()
            if not rows:
                break
        
            for row in rows:
                try:
                    ros_msg = RosUtil.bus_msg(row=row, frame_id=frame_id)
                    self.__record_ros_msg(topic=ros_topic, msg=ros_msg, ts=ros_msg.header.stamp)
                    self.__topic_sleep(ros_topic=ros_topic)
                except BaseException as _:
                    exc_type, exc_value, exc_traceback = sys.exc_info()
                    traceback.print_tb(exc_traceback, limit=20, file=sys.stdout)
                    self.logger.error(str(exc_type))
                    self.logger.error(str(exc_value))

            if self.request['preview']:
                break
        
        self.topic_active[ros_topic] = False