Skip to content

Commit

Permalink
confirm exposure time
Browse files Browse the repository at this point in the history
  • Loading branch information
23-yoshikawa committed Aug 25, 2024
1 parent 52f1bc0 commit f3f1d11
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions device/camera_reader/camera_reader/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f3f1d11

Please sign in to comment.