Hardware : Orbbec Astra
O/S: win 10
IDE: MS Visual Studio 2015
I can obtain depth and IR streams using OpenNI2, But when I use the Astra SDK, program stops at this line
“astra::Frame frame = reader.get_latest_frame();”
Full code;
Quote #include “astra/astra.hpp” #include “cstdio” #include “iostream”
int main(int argc, char** argv)
{
astra::initialize();
astra::StreamSet streamSet;
astra::StreamReader reader = streamSet.create_reader();
auto depthStream = reader.stream<astra::DepthStream>();
reader.stream<astra::DepthStream>().start();
const int maxFramesToProcess = 100;
int count = 0;
do {
astra::Frame frame = reader.get_latest_frame();
const auto depthFrame = frame.get < astra::DepthFrame > ();
const int frameIndex = depthFrame.frame_index();
const short pixelValue = depthFrame.data()[0];
std::cout << std::endl
<< "Depth frameIndex: " << frameIndex
<< " pixelValue: " << pixelValue
<< std::endl
<< std::endl;
count++;
} while (count < maxFramesToProcess);
std::cout << "Press any key to continue...";
std::cin.get();
astra::terminate();
std::cout << "hit enter to exit program" << std::endl;
std::cin.get();
return 0;
}
Unquote.
Further Orbbec Body Tracking v0.8.0-beta Version for windows works without any problem. I can not just depend on that. I need to have proper working SDK once I move to production.
If you are trying to run 2.0.8 beta 2 after 31 March 2018 then the system wont work - It is hard coded to fail after this time.
See other comments in this forum regarding expired SDK.
The trial expiration only applies to Orbbec Body Tracking. The rest of the SDK is unlimited.
StreamReaders try to synchronize all streams that are started on the StreamReader. This means that if one stream is delivering them at a slower rate or is not delivering frames, then the StreamReader will be slow or not deliver frames. For example, if you have a StreamReader with DepthStream and BodyStream started, it won’t deliver any frames because it cannot synchronize the missing body frames. (This is the case in some of the SDK samples that use BodyStream.) If you have that situation you can use separate StreamReaders for each stream, though that does not guarantee frame synchronization across streams.
Astra SDK v2.0.9 beta3 it’s already out with an extended expiration date to June 30, 2018. You can download it from Develop – Orbbec to continue development right now. If you would like a license key please request one by emailing info@orbbec3d.com and describing your application and timeline. They can help you and can generate you a license.