librealsense: C++ Rosbag: Failed to create ros reader: Bag unindexed
Required Info | |
---|---|
Camera Model | D400 |
Firmware Version | 05.10.13.00 |
Operating System & Version | Win 10 |
Kernel Version (Linux Only) | |
Platform | PC |
SDK Version | 2.16.5 |
Language | C++ |
Segment | others |
Introduction
Hello, I am trying to do a short rosbag
recording.
Goal
When a recording is done, with record.bag
, I want to use rs-convert.exe
to produce realsense_Color_7.png
, realsense_Depth_5.png
, and realsense_Depth_5.csv
.
Issue
I am unable to record and open .bag
files consistently. Without modifying my short rosbag
recording code, I can sometimes open the .bag
, but other time it gives me an error of
Failed to load file C:\Users\efoo1\Documents...\
Failed to create ros reader: Bag unindexed
ROSBAG Code:
if (camera_button_rosbag) {
pipe->start(recordConfig);
std::this_thread::sleep_for(std::chrono::milliseconds(1500));
pipe->stop();
std::cout << "Done Recording (ROSBAG)" << std::endl;
}
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 from rs-convert.cpp
right after a rosbag recording crashes the program too, caused by this bag unindexed error.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (2 by maintainers)
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