I've used the approach from @martiege. I tried to have a flag to mark if the dynamic_reconfigure server needed to be updated, and the call updateConfig with the new configuration, but this didn't work (the updateConfig never actually calls the dynamic_reconfigure server to update itself).
I've also added some extra logging to try to make a bit clearer what is happening when a user plays with the start_frame and stop_frame parameters.
I've increased the dynamic_reconfigure levels of changing start_frame and stop_frame to force re-subscribing as in the subscription point in the code we have the checks for the frame count. I couldn't move these checks to the dynamic_reconfigure call because we don't have a way to know the amount of frames up until we've opened the video file to call that API. Changing this would imply more changes than I'm comfortable making right now without adding a lot of unit tests (that we should have).
Based on this issue: https://github.com/ros-drivers/video_stream_opencv/issues/61
And this PR: https://github.com/ros-drivers/video_stream_opencv/pull/65
I've used the approach from @martiege. I tried to have a flag to mark if the dynamic_reconfigure server needed to be updated, and the call updateConfig with the new configuration, but this didn't work (the updateConfig never actually calls the dynamic_reconfigure server to update itself).
I've also added some extra logging to try to make a bit clearer what is happening when a user plays with the
start_frame
andstop_frame
parameters.I've increased the dynamic_reconfigure levels of changing
start_frame
andstop_frame
to force re-subscribing as in the subscription point in the code we have the checks for the frame count. I couldn't move these checks to the dynamic_reconfigure call because we don't have a way to know the amount of frames up until we've opened the video file to call that API. Changing this would imply more changes than I'm comfortable making right now without adding a lot of unit tests (that we should have).