astra icon indicating copy to clipboard operation
astra copied to clipboard

Cannot get data from PointStream unless I start DepthStream

Open BhargavaRamM opened this issue 7 years ago • 1 comments

Hello..

Thank you for providing great samples and Tutorials to use Astra with Orbbec sensors. They definitely made my life easier.

Coming to topic of discussion, I can't get the data from PointStream unless I start the DepthStream as well. For example..

// Initialize Astra
astra::initialize();

astra::StreamSet streamSet;
astra::StreamReader reader = streamSet.create_reader();

// Create a listener to listen on stream when frame is ready
// SampleFrameListener overrides on_frame_ready
SampleFrameListener sampleFrameListener;

// start the stream
reader.stream<astra::PointStream>().start();

// add listener
reader.add_listener(sampleFrameListener);
do {
  astra_temp_update();
} while(continue);

reader.remove_listener(sampleFrameListener);
astra::terminate();

The above code doesn't deliver me a PointFrame data. Instead It get's blocked during astra_temp_update().

But If I add the following line before starting astra::PointStream in the above code, it delivers me PointFrame.

reader.stream<astra::DepthStream>().start();

I am not sure if this is a bug or feature.. If any one has an idea what is going on, I would appreciate your help. Thank you.

BhargavaRamM avatar Aug 15 '17 16:08 BhargavaRamM