image_pipeline
image_pipeline copied to clipboard
Added dashcam mode to video_recorder
Added an optional "dashcam mode" for video recording. It will store a sequence of videos in a loop, deleting the oldest one. Several parameters have been added:
- dashcam_mode: (bool) Enabled/disabled dashcam mode.
- video_length: (double) Length in minutes of each video in dashcam mode.
- n_videos: (int) Number of videos in the loop of the dashcam mode.
- video_topic: (string) input image topic
- use_posix_timestamp: (bool) Use posix formated (human readable) timestamps in filenames.
I know this is old (just over a year) but I like the idea. However, I would rather call it something like "rolling_buffer," "ring_buffer," or similar instead of "dashcam" which is much more specific and, IMO, has other implications. Opinions welcome from the community (and maintainers - @SteveMacenski / @mjcarroll )
@IvanVN - If you're still keen on this type of thing, would you mind rebasing on melodic?
Agree, I think that this is an interesting and useful feature.
I agree that the name should also be changed. "rolling_buffer" seems like a suitable name. I believe that the GoPro calls it looping.
One feature that would be nice to have is to have a service/topic to trigger saving the current contents and starting a new loop. That way you could use something else in the system (say a failure incident or something) to cause it to store the duration of the video up to when the incident occurs.
I agree with @mjcarroll. Rolling buffer would make the most sense to me, and the ability to save sections of it would be useful. However I wouldnt make that feature as a requirement for merging this PR, but rather a feature request on a new ticket after this has been rebased and merged.
@JWhitleyAStuff I'll try to do it. Sadly right know I've to do it in my spare time and I don't have any melodic setup to test it, so I guess it will take me some time. If anyone wants to do it in the meantime, please feel free to do so.
@IvanVN Kinetic and Melodic are essentially the same for all intents and purposes for your PR. If you make sure it compiles and works in Kinetic and it passes Melodic CI, I think its fine.
I think it should be done. Compiled and tested in Kinetic. It also compiled OK in a Melodic docker.
What's the status of this @IvanVN
What's the status of this @IvanVN
Sorry, I haven't have the time yet to look into this...
@IvanVN Could I please get an update on this (and a rebase) if you're still interested in merging it? Sorry it's been forever since I checked back on it.
@IvanVN Could I please get an update on this (and a rebase) if you're still interested in merging it? Sorry it's been forever since I checked back on it.
I've replaced the vector for a queue, as suggested. I'm having troubles rebasing to noetic, though. It doesn't compile because of some missing package (my current setup is melodic). I will come back to this in a couple of days and test it in a noetic docker container.
@IvanVN Given that this has been hanging out for 2+ years, I'm going to close it as incomplete. If you come back to this at some time in the future, please re-open or create a new PR.