예제 #1
0
    def __init__(self):
        super().__init__('collect',
                         allow_undeclared_parameters=True,
                         automatically_declare_parameters_from_overrides=True)
        self.get_logger().info(
            f'[{self.get_name()}] Initializing the collector node...')

        mkdir_p(CSV_PATH)
        mkdir_p(IMG_PATH)

        sub_centre_camera = message_filters.Subscriber(
            self, CompressedImage,
            '/simulator/sensor/camera/center/image/compressed')
        sub_depth_centre = message_filters.Subscriber(
            self, CompressedImage,
            '/simulator/sensor/depth_camera/center/image/compressed')
        #sub_seg_centre = message_filters.Subscriber(self, CompressedImage, '/simulator/sensor/segmentation_camera')

        #sub_left90_camera = message_filters.Subscriber(self, CompressedImage, '/simulator/sensor/camera/left90/image/compressed')
        #sub_depth_left = message_filters.Subscriber(self, CompressedImage, '/simulator/sensor/depth_camera/left90/image/compressed')

        #sub_right90_camera = message_filters.Subscriber(self, CompressedImage, '/simulator/sensor/camera/right90/image/compressed')
        #sub_depth_right = message_filters.Subscriber(self, CompressedImage, '/simulator/sensor/depth_camera/right90/image/compressed')

        #sub_radar = message_filters.Subscriber(self, DetectedRadarObjectArray, '/simulator/sensor/radar')
        sub_control = message_filters.Subscriber(self, TwistStamped,
                                                 '/simulator/control/command')

        ts = message_filters.ApproximateTimeSynchronizer(
            [sub_centre_camera, sub_depth_centre, sub_control], 1000, 0.1)
        ts.registerCallback(self.callback)
        self.get_logger().info(
            f'[{self.get_name()}] Up and running the collector node...')
예제 #2
0
    def __init__(self):
        super().__init__('collect',
                         allow_undeclared_parameters=True,
                         automatically_declare_parameters_from_overrides=True)

        self.get_logger().info('[{}] Initializing...'.format(self.get_name()))

        mkdir_p(CSV_PATH)
        mkdir_p(IMG_PATH)

        sub_center_camera = message_filters.Subscriber(
            self, CompressedImage,
            '/simulator/sensor/camera/center/compressed')
        sub_left_camera = message_filters.Subscriber(
            self, CompressedImage, '/simulator/sensor/camera/left/compressed')
        sub_right_camera = message_filters.Subscriber(
            self, CompressedImage, '/simulator/sensor/camera/right/compressed')
        sub_control = message_filters.Subscriber(self, TwistStamped,
                                                 '/simulator/control/command')

        ts = message_filters.ApproximateTimeSynchronizer([
            sub_center_camera, sub_left_camera, sub_right_camera, sub_control
        ], 1, 0.1)
        ts.registerCallback(self.callback)

        self.get_logger().info('[{}] Up and running...'.format(
            self.get_name()))
예제 #3
0
    def __init__(self):
        super().__init__('collect',
                         allow_undeclared_parameters=True,
                         automatically_declare_parameters_from_overrides=True)

        self.get_logger().info('[{}] Initializing...'.format(self.get_name()))
        mkdir_p(IMG_PATH)

        sub_center_camera = message_filters.Subscriber(
            self, CompressedImage, '/lgsvl/front_6mm_image_compressed')
        segment_camera = message_filters.Subscriber(
            self, CompressedImage, '/lgsvl/segmentation_camera')

        ts = message_filters.ApproximateTimeSynchronizer(
            [sub_center_camera, segment_camera], 1, 0.1)
        ts.registerCallback(self.callback)

        self.get_logger().info('[{}] New Up and running...'.format(
            self.get_name()))