<?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: D435 streams work once, then crash in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499728#M6049</link>
    <description>&lt;P&gt;I think the person suggesting that code was just suggesting people put their own device ID in.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further down that page is an alternative version that looks for any connected camera.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs2::context ctx;&lt;/P&gt;&lt;P&gt;rs2::device dev = get_device_from_context(ctx);&lt;/P&gt;&lt;P&gt;dev.hardware_reset();&lt;/P&gt;&lt;P&gt;rs2::device_hub hub(ctx);&lt;/P&gt;&lt;P&gt;dev = hub.wait_for_device(); //Note that device hub will get any device, if you have more than 1 connected it could return the other device&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jul 2018 19:41:48 GMT</pubDate>
    <dc:creator>MartyG</dc:creator>
    <dc:date>2018-07-24T19:41:48Z</dc:date>
    <item>
      <title>D435 streams work once, then crash</title>
      <link>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499725#M6046</link>
      <description>&lt;P&gt;I have a D435 camera running the newest firmware.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Upon plugging it in, the camera works with any application (including all the examples, my own code, or the realsense viewer). However, if I stop the stream and start it again, it doesn't work for anything. Realsense-viewer gives me a "Frames not Recieved" error, and the only way I can fix it is by manually doing a hardware reset on the realsense-viewer, or unplugging/plugging it back in. I am NOT using ROS, so the ROS wrapper fixes do not help. (Note: I do not know how to do a hardware reset in C++, so if someone could tell me that would also be very helpful)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I've tried:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;an externally powered USB 3.0 hub to connects the realsense to the computer.&lt;/LI&gt;&lt;LI&gt;installing far more powerful memory chips&lt;/LI&gt;&lt;LI&gt;I've tried every single USB 3.0 hub on my computer (which probably isn't the problem anyways, since the streams always work the first time after I replug it in)&lt;/LI&gt;&lt;LI&gt;waiting a while, then trying to use the camera again (still doesn't work)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any clue what the issue might be? It makes it really tedious to run my script since I keep having to unplug the camera. Please let me know if you need any other information, and thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 18:41:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499725#M6046</guid>
      <dc:creator>VShen3</dc:creator>
      <dc:date>2018-07-24T18:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: D435 streams work once, then crash</title>
      <link>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499726#M6047</link>
      <description>&lt;P&gt;As you suggested, a hardware reset instruction placed at the start of a script can fix the problem of a camera needing reset via USB unplug-replug.  The instruction for this hardware_reset()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs2::device dev = device_you_are_using();&lt;/P&gt;&lt;P&gt;dev.hardware_reset(); //Will disconnect the camera and reconnect it. &lt;/P&gt;&lt;P&gt;//NOTE: All camera settings will be restored to default after this call (same as unplug-&amp;gt;plug)&lt;/P&gt;&lt;P&gt;//Don't use device after this line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/issues/1086"&gt;https://github.com/IntelRealSense/librealsense/issues/1086&lt;/A&gt; Frames didn't arrive error - after improper shutdown · Issue # 1086 · IntelRealSense/librealsense · GitHub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 19:24:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499726#M6047</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-07-24T19:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: D435 streams work once, then crash</title>
      <link>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499727#M6048</link>
      <description>&lt;P&gt;It isn't recognizing the command "device_you_are_using();" ("not declared in this scope"). Am I supposed to be importing something other than the standard ?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 19:28:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499727#M6048</guid>
      <dc:creator>VShen3</dc:creator>
      <dc:date>2018-07-24T19:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: D435 streams work once, then crash</title>
      <link>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499728#M6049</link>
      <description>&lt;P&gt;I think the person suggesting that code was just suggesting people put their own device ID in.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further down that page is an alternative version that looks for any connected camera.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs2::context ctx;&lt;/P&gt;&lt;P&gt;rs2::device dev = get_device_from_context(ctx);&lt;/P&gt;&lt;P&gt;dev.hardware_reset();&lt;/P&gt;&lt;P&gt;rs2::device_hub hub(ctx);&lt;/P&gt;&lt;P&gt;dev = hub.wait_for_device(); //Note that device hub will get any device, if you have more than 1 connected it could return the other device&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 19:41:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499728#M6049</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-07-24T19:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: D435 streams work once, then crash</title>
      <link>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499729#M6050</link>
      <description>&lt;P&gt;Similiary, "get_device_from_context" returns a "not declared in this scope" error. Am I still not importing something that I should be?&lt;/P&gt;&lt;P&gt;Thank you for all your help!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 22:59:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499729#M6050</guid>
      <dc:creator>VShen3</dc:creator>
      <dc:date>2018-07-26T22:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: D435 streams work once, then crash</title>
      <link>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499730#M6051</link>
      <description>&lt;P&gt;The documentation on the hardware_reset() function is very slim.  I would suggest pasting the line below into your script somewhere, and if that doesn't work then to open a new Issue on the Librealsense GitHub to ask the Intel programming experts there how to implement it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void rs2::device::hardware_reset ( )&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 06:48:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499730#M6051</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-07-27T06:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: D435 streams work once, then crash</title>
      <link>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499731#M6052</link>
      <description>&lt;P&gt;What is your computer platform and operating system?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Aug 2018 02:43:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499731#M6052</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2018-08-01T02:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: D435 streams work once, then crash</title>
      <link>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499732#M6053</link>
      <description>&lt;P&gt;Below is some sample code we used when we were testing and debugging this same issue.&lt;/P&gt;&lt;P&gt;If explains how the realsense context works - and how to iterate over all the current devices.&lt;/P&gt;&lt;P&gt;It also shows a mechanism for resetting a found intel device - and a mechanism to wait for the hardware to finishing resetting before continuing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Westa&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/////////////////////////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;// define a realsense context&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;std::cout &amp;lt;&amp;lt; "Initialising realsense context" &amp;lt;&amp;lt; std::endl;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs2::context rs2Ctx;&lt;/P&gt;&lt;P&gt;rs2::device rs2Dev;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;resettingIntelRealsense = 0;&lt;/P&gt;&lt;P&gt;resetCompleteIntelRealsense = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int gotDev = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Define a callback mechanism - to detect when the sensor has been reset&lt;/P&gt;&lt;P&gt;rs2Ctx.set_devices_changed_callback([&amp;amp;](rs2::event_information&amp;amp; info)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// loop thru all new devices - that is one that has been reset effectively&lt;/P&gt;&lt;P&gt;for (auto&amp;amp;&amp;amp; dev : info.get_new_devices())&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;std::string devName = "";&lt;/P&gt;&lt;P&gt;std::string devSerialNumber = "";&lt;/P&gt;&lt;P&gt;std::string devFirmware = "";&lt;/P&gt;&lt;P&gt;std::string devProdId = "";&lt;/P&gt;&lt;P&gt;devProdId = dev.get_info(RS2_CAMERA_INFO_PRODUCT_ID);&lt;/P&gt;&lt;P&gt;devSerialNumber = dev.get_info(RS2_CAMERA_INFO_SERIAL_NUMBER);&lt;/P&gt;&lt;P&gt;devName = dev.get_info(RS2_CAMERA_INFO_NAME);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (devName == "Intel RealSense D415")&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;devFirmware = dev.get_info(RS2_CAMERA_INFO_FIRMWARE_VERSION);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;if (devName == "Intel RealSense D435")&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;devFirmware = dev.get_info(RS2_CAMERA_INFO_FIRMWARE_VERSION);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;std::cout &amp;lt;&amp;lt; "RESET Dev: " &amp;lt;&amp;lt; devName &amp;lt;&amp;lt; " Ser: " &amp;lt;&amp;lt; devSerialNumber &amp;lt;&amp;lt; " Firmware: " &amp;lt;&amp;lt; devFirmware &amp;lt;&amp;lt; " ProdID " &amp;lt;&amp;lt; devProdId &amp;lt;&amp;lt; std::endl;&lt;/P&gt;&lt;P&gt;resetCompleteIntelRealsense = 1;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// interate thru the intel device context looking for intel sensors&lt;/P&gt;&lt;P&gt;// note that other devices like webcams can appear here too depending on their device type&lt;/P&gt;&lt;P&gt;for (auto&amp;amp;&amp;amp; dev : rs2Ctx.query_devices()) // Query the list of connected RealSense devices&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;std::string devName = "";&lt;/P&gt;&lt;P&gt;std::string devSerialNumber = "";&lt;/P&gt;&lt;P&gt;std::string devFirmware = "";&lt;/P&gt;&lt;P&gt;std::string devProdId = "";&lt;/P&gt;&lt;P&gt;devProdId = dev.get_info(RS2_CAMERA_INFO_PRODUCT_ID);&lt;/P&gt;&lt;P&gt;devSerialNumber = dev.get_info(RS2_CAMERA_INFO_SERIAL_NUMBER);&lt;/P&gt;&lt;P&gt;devName = dev.get_info(RS2_CAMERA_INFO_NAME);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (gotDev == 0 &amp;amp;&amp;amp; (devName == "Intel RealSense D415" || devName == "Intel RealSense D435"))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;devFirmware = dev.get_info(RS2_CAMERA_INFO_FIRMWARE_VERSION);&lt;/P&gt;&lt;P&gt;// assume there is only one intel camera for now&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// save the device for future use&lt;/P&gt;&lt;P&gt;rs2Dev = dev;&lt;/P&gt;&lt;P&gt;gotDev = 1;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;std::cout &amp;lt;&amp;lt; "System Dev: " &amp;lt;&amp;lt; devName &amp;lt;&amp;lt; " Ser: " &amp;lt;&amp;lt; devSerialNumber &amp;lt;&amp;lt; " Firmware: " &amp;lt;&amp;lt; devFirmware &amp;lt;&amp;lt; " ProdID " &amp;lt;&amp;lt; devProdId &amp;lt;&amp;lt; std::endl;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;// if we have found a realsense sensor - force initialise it if required&lt;/P&gt;&lt;P&gt;if (gotDev == 1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;// reset the hardware device found during initial iteration thru context&lt;/P&gt;&lt;P&gt;rs2Dev.hardware_reset();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// wait for hardware to reset reset&lt;/P&gt;&lt;P&gt;resetCompleteIntelRealsense = 0;&lt;/P&gt;&lt;P&gt;int rs2WaitForReset = 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// pause until device is reset  -  not elegant but will do for testing &lt;/P&gt;&lt;P&gt;while (resetCompleteIntelRealsense == 0 &amp;amp;&amp;amp; rs2WaitForReset &amp;lt; 9999999999)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;rs2WaitForReset++;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (gotDev == 0)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;std::cout &amp;lt;&amp;lt; "No Intel Realsense devices detected" &amp;lt;&amp;lt; std::endl;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 04:15:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499732#M6053</guid>
      <dc:creator>WTatt</dc:creator>
      <dc:date>2018-08-02T04:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: D435 streams work once, then crash</title>
      <link>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499733#M6054</link>
      <description>&lt;P&gt;did you menage to solve this problem?&lt;/P&gt;&lt;P&gt;im having the same problem&lt;/P&gt;&lt;P&gt;and i'm not sure where should i put this part of code. on which file? where?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 14:20:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/D435-streams-work-once-then-crash/m-p/499733#M6054</guid>
      <dc:creator>mbar</dc:creator>
      <dc:date>2018-12-13T14:20:04Z</dc:date>
    </item>
  </channel>
</rss>

