Skip to content

Commit

Permalink
Merge pull request #78 from rogy-AquaLab/exposure_time
Browse files Browse the repository at this point in the history
confirm exposure time
  • Loading branch information
H1rono authored Aug 27, 2024
2 parents 52f1bc0 + f3f1d11 commit de58c76
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 de58c76

Please sign in to comment.