Open CursedRock17 opened 9 months ago
Yes - there really isn't any reason to have two separate nodes that have similar, but not identical features. If image_saver supports saving at a particular rate, then it replaces the functionality of extract images node
Adding [a] new "fps" parameter to ImageSaver - when the parameter is set, we should setup a timer to fire and save images.
Do we need to make a TimerBase
with a new callback, or does that seem excessive? Furthermore, if we had that callback we would need to get access to that image, from inside the constructor of ImageSaverNode
Do we need to make a
TimerBase
with a new callback, or does that seem excessive? Furthermore, if we had that callback we would need to get access to that image, from inside the constructor ofImageSaverNode
The end goal is to save at a fixed rate, regardless of the rate that the image shows up - I haven't come up with anything better than a ROS timer. The timer would require another callback (the function signature is different). When FPS parameter is set, we would want the image callback to save the latest image in a class variable so that the timer callback can access it (and that also means adding a mutex to protect that shared variable in case somebody loads the component with a multi-threaded executor).
@mikeferguson friendly ping, this is ready for review
This PR looks to solve issue #935 by Merging
ExtractImagesNode
intoImageSaver
. Before we go ahead and do it, I assume we wantExtractImagesNode
entirely removed since ImageSaver will now have all the functionailty and more of that previous node, opposed to just inheriting from that class.