image_pipeline icon indicating copy to clipboard operation
image_pipeline copied to clipboard

Added dashcam mode to video_recorder

Open IvanVN opened this issue 7 years ago • 10 comments

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.

IvanVN avatar Mar 16 '18 12:03 IvanVN

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?

JWhitleyWork avatar Apr 25 '19 14:04 JWhitleyWork

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.

mjcarroll avatar Apr 25 '19 15:04 mjcarroll

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.

SteveMacenski avatar Apr 26 '19 04:04 SteveMacenski

@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 avatar Apr 26 '19 07:04 IvanVN

@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.

SteveMacenski avatar Apr 27 '19 21:04 SteveMacenski

I think it should be done. Compiled and tested in Kinetic. It also compiled OK in a Melodic docker.

IvanVN avatar May 02 '19 10:05 IvanVN

What's the status of this @IvanVN

SteveMacenski avatar Sep 18 '19 01:09 SteveMacenski

What's the status of this @IvanVN

Sorry, I haven't have the time yet to look into this...

IvanVN avatar Sep 18 '19 08:09 IvanVN

@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.

JWhitleyWork avatar Aug 19 '20 14:08 JWhitleyWork

@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 avatar Aug 26 '20 09:08 IvanVN

@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.

JWhitleyWork avatar Dec 04 '22 21:12 JWhitleyWork