-
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
Multiple problems while loading from .bag file. #7932
Comments
Hi @brunovollmer An auto-exposure frame skip mechanism would not usually be put in a playback mechanism. Instead, it would be put in the live capture script (the recording section) so that the initial frames are not captured. As it is playing back recorded data and not live frames in real-time from the camera, the bag file is not being affected by live auto-exposure. What a skip mechanism in bag playback may accomplish is skipping past the initial several frames if they have been captured in the bag instead of being skipped at the time of capture in the recording script. Jumping to a specific frame in a bag during playback does not work well when set_real_time = false. Skipping forward to the target frame is recommended instead. It looks as though you are using this method already though. This subject is discussed in the Python case in the link below. |
Thanks for answering @MartyG-RealSense, Regarding the skip mechanism you are absolutely right. Haven't thought about this. But my main problem is still open. My goal is simply to record and load all frames (depth and image) into and from the .bag file. I've tried multiple methods but all don't seem to work properly as they either produce the Frame didn't arrive error or the mentioned Runtime error. What is the suggested way to record data and load it from a .bag file? |
Your problem reminds me of a similar past Python case involving RuntimeError: Frame didn't arrive within 5000. The RealSense user in that case posted their script solution at the end of the discussion. |
So after reading your suggestions and searching a bit more I've found a working solution for both problems. To avoid the RuntimeError: Frame didn't arrive within 5000 error I've used the suggested method from the other post (#6766) to compute the number of frames and I completely removed the playback code. The other error I guess was related to performance issues or something as the error was resolved by replacing the line
with this line
Thanks for the quick help. I hope that this helps somebody else when he encounters similar problems! |
Thanks so much for sharing your solution with the community @brunovollmer :) Great news that you were successful. |
Issue Description
Hey,
currently I'm struggling with loading a set of frames that I saved into a .bag file. I've included the code below. I struggle with two problems. If I just want to load the data without doing anything with it (see Loading Code) than after some frames I receive this error:
If I extend the loading code (see Loading Code Extended) to the actual use case I receive another error a lot earlier:
The extended version already crashes after 9 frames, while the first loading codes runs for about 100 frames.
Recording Code
Loading Code
Loading Code Extended
The text was updated successfully, but these errors were encountered: