From f3f1d11f9b48a032b727a46912ea410400a98f85 Mon Sep 17 00:00:00 2001 From: 23-yoshikawa Date: Mon, 26 Aug 2024 00:06:52 +0900 Subject: [PATCH] confirm exposure time --- device/camera_reader/camera_reader/camera.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/device/camera_reader/camera_reader/camera.py b/device/camera_reader/camera_reader/camera.py index 0536ce0..5d6bc83 100644 --- a/device/camera_reader/camera_reader/camera.py +++ b/device/camera_reader/camera_reader/camera.py @@ -38,6 +38,9 @@ def _generate_header(self) -> Header: def timer_callback(self): ret, frame = self.cap.read() if ret: + exposure_time = self.cap.get(cv2.CAP_PROP_EXPOSURE) + if exposure_time >= 0: + self.get_logger().info(f"Exposure time: {exposure_time}") msg = self.bridge.cv2_to_compressed_imgmsg(frame) msg.header = self._generate_header() self.publisher_.publish(msg)