So basically I’ve tried something as basic as this:
- Initialize astra
- Start DepthStream
- Start BodyStream
- Wait for listener to catch frames
- Add listener to reader
Problem: listener caught no frames.
I then tried commenting out 3rd point on my list (starting the body stream), and frames were caught by my listener.
Here is my code:
astra::initialize();
const char* licenseString = "<INSERT LICENSE KEY HERE>";
orbbec_body_tracking_set_license(licenseString);
astra::StreamSet sensor;
astra::StreamReader reader = sensor.create_reader();
StreamListener listener;
reader.stream<astra::DepthStream>().start();
reader.stream<astra::BodyStream>().start();
reader.add_listener(listener);
while (true)
{
astra_update();
}
StreamListener is a class that extends astra::FrameListener and implements virtual void on_frame_ready(…) which will only print out “Frame caught”.
In my console I’ve noticed that all dll’s have been loaded, but OrbbecBodyTracking.dll is unloaded.
I’m using Windows 10 and Visual Studio 2015.
Make sure you have the file astra.toml setup in your executable folder - and that it points to the location of the OrbbecBodyTracking.dll - which should usually be in a plugins sub folder of the executable folder.
Westa
Already had that setup before.
This is how my astra.toml looks like:
[logging]
#
trace, debug, info, warn, error, fatal
level = “error”
console_output = true
file_output = true
[plugins]
#
path = “Plugins”
OrbbecBodyTracking.dll is located in sub-folder Plugins as you mentioned.
I tried changing path to “.\Plugins”, ".\Plugins", and “C:\Users\vitom\Documents\Visual Studio 2015\Projects\astra-joint-tracking\x64\Debug\Plugins” which is complete local path to Plugins folder but nothing changed.
I’m still not receiving any frames after starting body stream, and OrbbecBodyTracking.dll is still unloading right after loading.
My folder where dll’s are looks like this:
Also I’ve tried starting other streams without BodyStream (for example DepthStream and HandStream) and everything works perfect. But as soon as I start BodyStream in application, no frames will be ready.
Okay so after hours and hours of trying everything I finally found what a stupid mistake I made.
SOLUTION:
Basically, I copied opencv dll’s to my folder where executable is and it works now.