-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How does rs-record-playback.cpp work? [C++] #2700
Comments
NOTE: For readability's sake, I rewrote my comment from another thread I found a workaround, but this method compromises the color camera frames recorded to the The first thing you want to do is to record a A more complete code when capturing
To convert these files into a single frame capture, either to Here is a more complete code modified from
From the above example, I captured either frames 5, 6 or 7 in case the convert program skips frames, which happens quite often. |
[Realsense Customer Engineering Team Comment] Is the workaround you found good enough for your case? Thanks! |
Hi HippoEug, If there is noting else, this one will be closed soon. Thanks! |
Introduction
Hello community! 😺 My goal of this question is to record just 1 frame and save it as a
.bag (rosbag)
format if possible. If this is not possible, this should not be a problem as well.My reason for wanting only 1 frame in a
.bag
file is for performance, to decrease processing time required when usingrs-convert.cpp
.I have asked this similar question once here. I tried the given suggestion, but it does not seem to work. My question is how does the API determine when to start the recording of
.rosbag
file in the code? I will elaborate further below after Goals.Goal
Using
rs-record-playback.cpp
, I managed to capture a.bag
file, which I then threw it intors-convert.cpp
to convert into a.csv
file with each individual frame (x, y, z) coordinates.My theory is the smaller the
.bag
file, the lesser frames it contains which means the shorter the time it needs forrs-convert.cpp
to convert the.bag
file to.csv
file(s).rs-convert
File Explorer with ~0.5s of recording, theoretically should have 15 frames converted, but 9 actual frames
Issue
The code to do a recording to
.bag
file seems pretty straight forward. However unlikers-capture.cpp
etc which does:I do not find any code in
rs-record-playback.cpp
that does any function which manages the frames. All it does is create aconfig cfg
with the functioncfg.enable_record_to_file()
.My own code segment to record ~0.5s of
.bag
fileBased on the above code segment,
pipe->start(cfg)
starts the recording andpipe->stop()
stops the recording, and no where to specify how many frames I would like to record. Is this correct? I tried looking intocfg.enable_record
, but all I can find is this:Edit
Alternatively, I can do it in the
rs-convert.cpp
code to just convert 1 frame, correct?The text was updated successfully, but these errors were encountered: