-
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
problems in rs_convert #1919
Comments
Hi! |
I have this frame dropping issue too. I recorded about 30 seconds @ 30 fps but instead of the expected 900 depth images I got only 390-400 (exact number varies each time I execute the tool) |
If you need something temporarily, you can use this python script, it requires opencv and realsense python bindings. You could probably get past opencv by using another image library like Pillow (PIL).
|
Thanks, it looks stable way more stable with the python wrapper! |
ObjetiveGet the depth image and the color image in two separate folders. Code
Issues with the python exempleWhen I only save depth OR color frame, the number of exported images vary but i got ~1400 frames for my ros_bag. When I try to save both frames at the same time, it also vary but I got less frames (~700 frames with the same ros_bag). So ~1400 frames for both captors... So even with the python wrapper, the issue persist. |
I agree, it looks like an issue of timing. I have my own c++ code that can save depth and rgb images in two separate instances and frames are not dropped. However, if I try to save them at the same time or if I introduce any delay in the loop (e.g. if I want to do some processing), frames are dropped. It looks like pausing or resuming the playback does not always work, and the realtime flag has no effect |
Does your code save the images from a rosbag? |
There you go, it's ugly and uses a fat global variable but it works. The function to call is extractImagesFromBagFile. You will need opencv. Let me know how you get on. It also outputs timestamps, feel free to remove it if you don't need it
|
I'll test this as soon as I can and come back to you! Thanks! |
Hi @marcovs, I've an issue with your code, I only have few .png in the output folder but the realsenseProcessedFrames indicate the good number of frames. I think my declaration of the fout variable is wrong (I think yours is in your realsenseUtils.hpp). Here is what I did in the extractImagesFromBagFile function :
|
I finally successfully ran your code but I still got frame drop. Here is what i did to save all the frames (my issues was that the name of the frame saved was the same at each iteration):
|
@baptiste-mnh @apoorva2398 @ev-mp Thank you for the pointers. I worked on it a little bit and I made a class that reads bag files using directly the rosbag API. Please check issue #2215 for the code. I hope it can be useful |
@baptiste-mnh @TheMikeyR @marcovs - I think ROS-bag reading issues are behind us, with v2.16.1 release. |
[Realsense Customer Engineering Team Comment] Any update based on the new librealsense? |
Hi @dorodnic @RealSense-Customer-Engineering, |
I tested the recently released version of the rs_convert tool. However I found the following problems:
Even with small bag files (~150MB), it drops frames. I was unable to extract all frames from a bag with 427 color and 430 depth frames. The number of frames dropped varies in each execution instance.
Sometimes it crashes before completion. I suspect it is also because of timing issues. When debugging, it points to the following line:
I was hoping to use the tool as a base for non-realtime processing of rosbags frame-by-frame. However, every time I tried with playback.resume() and playback.pause() even before the rs_convert tool was released I ran in issues 1 or 2. Are there any suggestions for my use-case?
The text was updated successfully, but these errors were encountered: