<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic rosbag repeated replay question in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/rosbag-repeated-replay-question/m-p/628846#M13985</link>
    <description>&lt;P&gt;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 &lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/blob/master/src/media/readme.md"&gt;https://github.com/IntelRealSense/librealsense/blob/master/src/media/readme.md&lt;/A&gt; librealsense/&lt;A href="http://readme.md"&gt;readme.md&lt;/A&gt; at master · IntelRealSense/librealsense · GitHub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by using&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;auto dev = profile.get_device();&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;if(auto p = &lt;A href="http://dev.as"&gt;dev.as&lt;/A&gt;())&lt;P&gt;&amp;nbsp;&lt;/P&gt;{&lt;P&gt;&amp;nbsp;&lt;/P&gt;  //Use p for playback functionality&lt;P&gt;&amp;nbsp;&lt;/P&gt;}&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can pause and resume the streams, but I'm not sure where access to the repeating functionality is managed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Mar 2018 14:45:43 GMT</pubDate>
    <dc:creator>lbloy</dc:creator>
    <dc:date>2018-03-23T14:45:43Z</dc:date>
    <item>
      <title>rosbag repeated replay question</title>
      <link>https://community.intel.com/t5/Items-with-no-label/rosbag-repeated-replay-question/m-p/628846#M13985</link>
      <description>&lt;P&gt;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 &lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/blob/master/src/media/readme.md"&gt;https://github.com/IntelRealSense/librealsense/blob/master/src/media/readme.md&lt;/A&gt; librealsense/&lt;A href="http://readme.md"&gt;readme.md&lt;/A&gt; at master · IntelRealSense/librealsense · GitHub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by using&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;auto dev = profile.get_device();&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;if(auto p = &lt;A href="http://dev.as"&gt;dev.as&lt;/A&gt;())&lt;P&gt;&amp;nbsp;&lt;/P&gt;{&lt;P&gt;&amp;nbsp;&lt;/P&gt;  //Use p for playback functionality&lt;P&gt;&amp;nbsp;&lt;/P&gt;}&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can pause and resume the streams, but I'm not sure where access to the repeating functionality is managed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 14:45:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/rosbag-repeated-replay-question/m-p/628846#M13985</guid>
      <dc:creator>lbloy</dc:creator>
      <dc:date>2018-03-23T14:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: rosbag repeated replay question</title>
      <link>https://community.intel.com/t5/Items-with-no-label/rosbag-repeated-replay-question/m-p/628847#M13986</link>
      <description>&lt;P&gt;Judging by the example script in the playback documentation, I would guess that you would put &lt;B&gt;pipe.stop()&lt;/B&gt; at the end of your playback script to stop it looping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs2::config cfg;&lt;/P&gt;&lt;P&gt;cfg.enable_device_from_file("path_to_input_file.bag");&lt;/P&gt;&lt;P&gt;rs2::pipeline pipe;&lt;/P&gt;&lt;P&gt;pipe.start(cfg); //File will be opened in read mode at this point&lt;/P&gt;&lt;P&gt;for (int i = 0; i &amp;lt; 30; i++)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;    rs2::frameset frames;&lt;/P&gt;&lt;P&gt;    if (pipe.poll_for_frames(&amp;amp;frames))&lt;/P&gt;&lt;P&gt;    {&lt;/P&gt;&lt;P&gt;        //use frames here&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;    //Note that we use poll_for_frames instead of wait_for_frames&lt;/P&gt;&lt;P&gt;    //This is because the file only contains a finite amount of frames&lt;/P&gt;&lt;P&gt;    // and if we use wait_for_frames then after reading the entire file&lt;/P&gt;&lt;P&gt;    // we will fail to wait for the next frame (and get an exception)&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;pipe.stop(); //File will be closed at this point&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 15:26:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/rosbag-repeated-replay-question/m-p/628847#M13986</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-03-23T15:26:43Z</dc:date>
    </item>
  </channel>
</rss>

