- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'd like to be able to playback from a saved rosbag file, but I'd like the playback to not repeat. This is clearly doable from looking at the realsense-viewer, but I'm not sure how to do it from a more straight forward pipe instance as shown in
https://github.com/IntelRealSense/librealsense/blob/master/src/media/readme.md librealsense/readme.md at master · IntelRealSense/librealsense · GitHub
by using
auto dev = profile.get_device();
{
//Use p for playback functionality
}
I can pause and resume the streams, but I'm not sure where access to the repeating functionality is managed?
Thanks.
- Tags:
- Intel® 360 Replay
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Judging by the example script in the playback documentation, I would guess that you would put pipe.stop() at the end of your playback script to stop it looping.
rs2::config cfg;
cfg.enable_device_from_file("path_to_input_file.bag");
rs2::pipeline pipe;
pipe.start(cfg); //File will be opened in read mode at this point
for (int i = 0; i < 30; i++)
{
rs2::frameset frames;
if (pipe.poll_for_frames(&frames))
{
//use frames here
}
//Note that we use poll_for_frames instead of wait_for_frames
//This is because the file only contains a finite amount of frames
// and if we use wait_for_frames then after reading the entire file
// we will fail to wait for the next frame (and get an exception)
}
pipe.stop(); //File will be closed at this point
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page