-
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
C++ Rosbag: Failed to create ros reader: Bag unindexed #2835
Comments
Hi @HippoEug |
Hi Dorodnic,
However there is an interesting difference I do not understand. Code:
During Rosbag conversion, at In the mean time, I will try to find a temporary workaround. Thank you! |
Hi @HippoEug { // Note the added scope
rs2::config convertConfig;
convertConfig.enable_record_to_file("record.bag");
pipe->start(convertConfig);
} I think this might be related. |
Hi @dorodnic I am still pretty confused. Firstly, what changes would the I did some modifications:
Running this code segment right after doing a ROSBAG recording with pipeline successfully closed still causes this error.. |
I am having the same issue. First, I tried to open a saved rosbag file, which is saved by a different application, and the poll_for_frames returns false and I cannot read anything from the file. |
@armandok Yeap, I got to close the application after recording, then re-open again to open the recording. Have you found a workaround? Glad I wasn't the only one experiencing this issue |
@HippoEug Unfortunately not. |
I can open the rosbag file with Realsense Viewer and my own app IF I close out my app immediately after recording the rosbag file (using my app). If I attempt to open the file after rosbag recording is done without restarting my app, it will crash on my app, and Realsense Viewer would give the bag unindexed error. What I have to do currently on my application:
Seems like there is no way to skip step 3 at the moment Hence I am still thinking there is something in the destructor that is causing this, just that I do not know what is. |
Hi HippoEug, Wonder if there is any updates from you on this one? Thanks! |
Hi HippoEug, Any update from your side? Thanks! |
If I'm not mistaken, this issue has the same underlying cause as our issue with the Python wrapper (i.e., the bag is not written and closed when the pipeline is stopped). That issue still exists for me, even though there are ways to work around it (see that thread). |
@realsens01 @HippoEug Bag unindexed is caused by recording being unexpectedly interrupted or not properly closed. Did you get the same issue using provided playback-record demo? |
Which playback-record demo? From the thread that I linked, or this thread? As discussed in this thread, it seems like an object destruction issue. If I understand correctly, something is holding the bag open past the point at which the person doing the coding expects it to be, so the index is not written. Is there a reason that the bag is not indexed when |
@realsense01 Please find record-playback demo in https://github.com/IntelRealSense/librealsense/tree/master/examples/record-playback |
Not really sure why this was closed. The issue remains and my question was not answered. dorodnic referred to this as an unresolved issue, and I continue to have problems with it. Maybe because the OP is not responding? I'll go ahead and create a new issue to refer to the same problem... again |
Introduction
Hello, I am trying to do a short
rosbag
recording.Goal
When a recording is done, with
record.bag
, I want to users-convert.exe
to producerealsense_Color_7.png
,realsense_Depth_5.png
, andrealsense_Depth_5.csv
.Issue
I am unable to record and open
.bag
files consistently. Without modifying my shortrosbag
recording code, I can sometimes open the.bag
, but other time it gives me an error ofFailed to load file C:\Users\efoo1\Documents...\
Failed to create ros reader: Bag unindexed
ROSBAG Code:
The pipeline is stopped successfully (or so I think), why would I still have the bag unindexed error? Sometimes I wouldn't have this error, sometimes I would. I am unable to find out what is causing this, since this is random and isn't consistent..
Any help is appreciated, thanks!
Edit
After a recording is done, if I close the program from the console window, I will get the bag unindexed error even though pipeline is closed. If i close the program from the main GLFW window instead, this error would occur lesser (or maybe none at all). Is there anything in the destructor that is causing this?
The information would be helpful to me because I plan to run the rosbag converter in the program itself right after rosbag recording, not using
rs-convert.exe
. Running the rosbag converter code copied fromrs-convert.cpp
right after a rosbag recording crashes the program too, caused by this bag unindexed error.The text was updated successfully, but these errors were encountered: