<?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 Re: pipe.start(cfg) fails with rs2::wrong_api_call_sequence_error in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/pipe-start-cfg-fails-with-rs2-wrong-api-call-sequence-error/m-p/654464#M15055</link>
    <description>&lt;P&gt;@MartyG The pipe was declared before the snippet. Otherwise the code wouldn't have compiled. I made a bare-bones version of the project and verified that the rs2::config is what is causing the exception. I have pasted below the test program in its entirely&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;signal.h&amp;gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;unistd.h&amp;gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;librealsense2/rs.hpp&amp;gt; // Include RealSense Cross Platform API&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;bool signal_recieved = false;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void sig_handler(int signo)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if( signo == SIGINT )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("received SIGINT\n");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;signal_recieved = true;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;int main( int argc, char** argv )&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if( signal(SIGINT, sig_handler) == SIG_ERR )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("\ncan't catch SIGINT\n");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;rs2::pipeline pipe;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;// Start streaming with only right and left IR imagers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;rs2::config cfg;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;cfg.enable_stream(RS2_STREAM_INFRARED, 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;cfg.enable_stream(RS2_STREAM_INFRARED, 1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;printf("starting pipe\n");&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;pipe.start(cfg); // Doesn't work&lt;/B&gt;&lt;/P&gt;&lt;P&gt;  // pipe.start(); // works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;printf("pipe started\n");&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;return 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 09 Jun 2019 00:55:01 GMT</pubDate>
    <dc:creator>vicky</dc:creator>
    <dc:date>2019-06-09T00:55:01Z</dc:date>
    <item>
      <title>pipe.start(cfg) fails with rs2::wrong_api_call_sequence_error</title>
      <link>https://community.intel.com/t5/Items-with-no-label/pipe-start-cfg-fails-with-rs2-wrong-api-call-sequence-error/m-p/654462#M15053</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I start the pipe using start() without a configuration, everything works fine. But if I start the pipe with the following configuratopn, it fails&lt;/P&gt;&lt;P&gt;// Camera D415&lt;/P&gt;&lt;P&gt;// platform: linux on jetson &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;rs2::config cfg;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;cfg.enable_stream(RS2_STREAM_INFRARED, 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;cfg.enable_stream(RS2_STREAM_INFRARED, 1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;printf("starting pipe\n");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;pipe.start(cfg);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;printf("pipe started\n");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output&lt;/P&gt;&lt;P&gt;starting pipe&lt;/P&gt;&lt;P&gt;terminate called after throwing an instance of 'rs2::wrong_api_call_sequence_error'&lt;/P&gt;&lt;P&gt;&amp;nbsp;what():&amp;nbsp;Device already streaming!&lt;/P&gt;&lt;P&gt;Aborted (core dumped)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made sure no other program is using the camera&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas what could be wrong ?&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jun 2019 21:28:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/pipe-start-cfg-fails-with-rs2-wrong-api-call-sequence-error/m-p/654462#M15053</guid>
      <dc:creator>vicky</dc:creator>
      <dc:date>2019-06-08T21:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: pipe.start(cfg) fails with rs2::wrong_api_call_sequence_error</title>
      <link>https://community.intel.com/t5/Items-with-no-label/pipe-start-cfg-fails-with-rs2-wrong-api-call-sequence-error/m-p/654463#M15054</link>
      <description>&lt;P&gt;Following through the sequence of your code and the debug statements that are printed, it looks as though the program is failing when the&amp;nbsp;&lt;B&gt;pipe.start(cfg)&lt;/B&gt; line is reached, meaning that it never reaches the debug print statement "pipe started".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the SDK's example script in its API How To doc, there is an &lt;B&gt;rs2::pipeline pipe; &lt;/B&gt;statement preceding the pipeline start instruction, which your script doesn't have.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rs2::config cfg;&lt;/P&gt;&lt;P&gt;cfg.enable_stream(RS2_STREAM_INFRARED, 0);&lt;/P&gt;&lt;P&gt;cfg.enable_stream(RS2_STREAM_INFRARED, 1);&lt;/P&gt;&lt;P&gt;&lt;B&gt;rs2::pipeline pipe;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;pipe.start(cfg);&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jun 2019 21:57:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/pipe-start-cfg-fails-with-rs2-wrong-api-call-sequence-error/m-p/654463#M15054</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2019-06-08T21:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: pipe.start(cfg) fails with rs2::wrong_api_call_sequence_error</title>
      <link>https://community.intel.com/t5/Items-with-no-label/pipe-start-cfg-fails-with-rs2-wrong-api-call-sequence-error/m-p/654464#M15055</link>
      <description>&lt;P&gt;@MartyG The pipe was declared before the snippet. Otherwise the code wouldn't have compiled. I made a bare-bones version of the project and verified that the rs2::config is what is causing the exception. I have pasted below the test program in its entirely&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;signal.h&amp;gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;unistd.h&amp;gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;librealsense2/rs.hpp&amp;gt; // Include RealSense Cross Platform API&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;bool signal_recieved = false;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void sig_handler(int signo)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if( signo == SIGINT )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("received SIGINT\n");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;signal_recieved = true;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;int main( int argc, char** argv )&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if( signal(SIGINT, sig_handler) == SIG_ERR )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("\ncan't catch SIGINT\n");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;rs2::pipeline pipe;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;// Start streaming with only right and left IR imagers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;rs2::config cfg;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;cfg.enable_stream(RS2_STREAM_INFRARED, 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;cfg.enable_stream(RS2_STREAM_INFRARED, 1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;printf("starting pipe\n");&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;pipe.start(cfg); // Doesn't work&lt;/B&gt;&lt;/P&gt;&lt;P&gt;  // pipe.start(); // works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;printf("pipe started\n");&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;return 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jun 2019 00:55:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/pipe-start-cfg-fails-with-rs2-wrong-api-call-sequence-error/m-p/654464#M15055</guid>
      <dc:creator>vicky</dc:creator>
      <dc:date>2019-06-09T00:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: pipe.start(cfg) fails with rs2::wrong_api_call_sequence_error</title>
      <link>https://community.intel.com/t5/Items-with-no-label/pipe-start-cfg-fails-with-rs2-wrong-api-call-sequence-error/m-p/654465#M15056</link>
      <description>&lt;P&gt;My understanding is that ​&lt;B&gt;rs2::pipeline pipe &lt;/B&gt;and the pipe start instruction should always be declared after the cfg lines are completed, like in the example code quoted. &lt;/P&gt;</description>
      <pubDate>Sun, 09 Jun 2019 02:52:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/pipe-start-cfg-fails-with-rs2-wrong-api-call-sequence-error/m-p/654465#M15056</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2019-06-09T02:52:26Z</dc:date>
    </item>
  </channel>
</rss>

