Skip to content

Commit

Permalink
Revert "Update extract_images_sync to add sec_per_frame parameter"
Browse files Browse the repository at this point in the history
This reverts commit 38a3116.
  • Loading branch information
artineering committed Jan 31, 2024
1 parent 38a3116 commit a8f4382
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions image_view/scripts/extract_images_sync
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,10 @@ class ExtractImagesSync(Node):
super().__init__('extract_images_sync')
self.get_logger().info('Extract_Images_Sync Node has been started')
self.seq = 0
self.time = self.get_clock().now()
self.fname_fmt = self.declare_parameter(
'filename_format', 'frame%04i_%i.jpg').value

# Do not scale dynamically by default.
'filename_format', 'frame%04i_%i.jpg').value
self.do_dynamic_scaling = self.declare_parameter(
'do_dynamic_scaling', False).value

# Limit the throughput to 10fps by default.
self.sec_per_frame = self.declare_parameter(
'sec_per_frame', 0.1).value

img_topics = self.declare_parameter('inputs', None).value

if img_topics is None:
Expand All @@ -88,17 +80,6 @@ Typical command-line usage:
sync.registerCallback(self.save)

def save(self, *imgmsgs):
delay = self.get_clock().now() - self.time

# Decimation is enabled if it is set to greater than
# zero. If it is enabled, exit if delay is less than
# the decimation rate specified.
if (self.sec_per_frame > 0) and (delay < self.sec_per_frame):
return

# Update the current time
self.time = self.get_clock().now()

seq = self.seq
bridge = cv_bridge.CvBridge()
for i, imgmsg in enumerate(imgmsgs):
Expand Down

0 comments on commit a8f4382

Please sign in to comment.