Femto Orbec error to run IR and Depth stream

Hello!

I have 3 Femto cameras and I need to retrieve RAW stream from IR and Depth sensors.
I’m using C++ api.
Code sample:

		auto profiles = pipeline.getStreamProfileList(type);

		std::shared_ptr<ob::VideoStreamProfile> profile = nullptr;
		if (profiles) {

			try {
				profile = profiles->getVideoStreamProfile(640, 480, ((type == 2) ? OB_FORMAT_RGB : OB_FORMAT_Y16), 10);

			}
			catch (ob::Error& e) {
				std::cerr << type<<" function:" << e.getName() << "\nargs:" << e.getArgs() << "\nmessage:" << e.getMessage() << "\ntype:" << e.getExceptionType() << " "<<OB_EXCEPTION_TYPE_INVALID_VALUE << std::endl;

				profile = std::const_pointer_cast<ob::StreamProfile>(profiles->getProfile(0))->as<ob::VideoStreamProfile>();
			}
		}

		config->enableStream(profile);

Where type is IR and Depth.

During running pipeline I’m receiving this error:

[I20230711 16:48:25.076340 15876 Pipeline.cpp:181] Pipeline start() start!
[I20230711 16:48:25.076340 15876 FrameProcessingBlockManager.cpp:75]  FrameProcessingBlockManager started, 0 processingblocks contained!
[I20230711 16:48:25.077340 15876 Pipeline.cpp:226] Start stream ...
[I20230711 16:48:25.077340 15876 VideoSensor.cpp:502] VideoSensor::start, SensorType=OB_SENSOR_IR
[I20230711 16:48:25.077340 15876 FrameBufferManager.hpp:58] FrameBufferManager created! @class libobsensor::FrameBufferManager<class libobsensor::IRFrame>, obj addr:2064430402672, frame obj total size:0.586364MB
[I20230711 16:48:25.077340 15876 FrameBufferManager.cpp:119] IRFrame bufferManager created!
[I20230711 16:48:25.078341 15876 VideoSensor.cpp:579] Profile: width=640, height=480, fps=10, format=OB_FORMAT_Y16
[I20230711 16:48:25.090340 15876 VideoSensor.cpp:625] Stream starting! SensorType=OB_SENSOR_IR
[I20230711 16:48:25.090340 15876 Pipeline.cpp:237] Sensor start, sensorType=OB_SENSOR_IR streamType=OB_STREAM_IR
[I20230711 16:48:25.091341 15876 VideoSensor.cpp:502] VideoSensor::start, SensorType=OB_SENSOR_DEPTH
[I20230711 16:48:25.091341 15876 FrameBufferManager.hpp:58] FrameBufferManager created! @class libobsensor::FrameBufferManager<class libobsensor::DepthFrame>, obj addr:2064430400560, frame obj total size:0.586371MB
[I20230711 16:48:25.092340 15876 FrameBufferManager.cpp:107] DepthFrame bufferManager created!
[I20230711 16:48:25.092340 15876 FrameProcessor.cpp:75]  FrameProcessor stoped!
[I20230711 16:48:25.093339 15876 FrameProcessor.cpp:66]  FrameProcessor started, 1 block contained!
[I20230711 16:48:25.093339 15876 VideoSensor.cpp:579] Profile: width=640, height=480, fps=10, format=OB_FORMAT_Y16
[W20230711 16:48:25.104341 15876 ObException.hpp:40] streamReader_->ReadSample(...) returned: HResult 0x80070018: "The program issued a command but the command length is incorrect."
[W20230711 16:48:25.105340 15876 MfUvc.cpp:999] 
Execute failure! A libobsensor_exception has occurred!
	 where: 999 # libobsensor::pal::WmfUvcDevice::startStream
	 msg: streamReader_->ReadSample(...) returned: HResult 0x80070018: "The program issued a command but the command length is incorrect."
	 type: class libobsensor::windows_pal_exception
[W20230711 16:48:25.105340 15876 MfUvc.cpp:999] Retry to start stream!
[W20230711 16:48:25.106340 15876 ObException.hpp:40] streamReader_->Flush(index) returned: HResult 0x80070018: "The program issued a command but the command length is incorrect."
[W20230711 16:48:25.106340 15876 MfUvc.cpp:999] 
Execute failure! A libobsensor_exception has occurred!
	 where: 999 # libobsensor::pal::WmfUvcDevice::startStream
	 msg: streamReader_->Flush(index) returned: HResult 0x80070018: "The program issued a command but the command length is incorrect."
	 type: class libobsensor::windows_pal_exception
[W20230711 16:48:25.141340 15876 ObException.hpp:40] streamReader_->ReadSample(...) returned: HResult 0x80070018: "The program issued a command but the command length is incorrect."
[W20230711 16:48:25.142340 15876 VideoSensor.cpp:605] 
Execute failure! A libobsensor_exception has occurred!
	 where: 605 # libobsensor::VideoSensor::start
	 msg: streamReader_->ReadSample(...) returned: HResult 0x80070018: "The program issued a command but the command length is incorrect."
	 type: class libobsensor::windows_pal_exception
[I20230711 16:48:25.142340 15876 VideoSensor.cpp:625] Stream starting! SensorType=OB_SENSOR_DEPTH
[I20230711 16:48:25.143340 15876 Pipeline.cpp:237] Sensor start, sensorType=OB_SENSOR_DEPTH streamType=OB_STREAM_DEPTH
[I20230711 16:48:25.143340 15876 VideoSensor.cpp:502] VideoSensor::start, SensorType=OB_SENSOR_COLOR
[I20230711 16:48:25.143340 15876 FrameBufferManager.hpp:58] FrameBufferManager created! @class libobsensor::FrameBufferManager<class libobsensor::ColorFrame>, obj addr:2064430402848, frame obj total size:0.879333MB
[I20230711 16:48:25.143340 15876 FrameBufferManager.cpp:123] ColorFrame bufferManager created!
[I20230711 16:48:25.144341 15876 FrameProcessor.cpp:75]  FrameProcessor stoped!
[I20230711 16:48:25.144341 15876 FrameProcessor.cpp:66]  FrameProcessor started, 1 block contained!
[I20230711 16:48:25.144341 15876 VideoSensor.cpp:579] Profile: width=640, height=480, fps=10, format=OB_FORMAT_RGB888
[I20230711 16:48:25.188341 15876 VideoSensor.cpp:625] Stream starting! SensorType=OB_SENSOR_COLOR
[I20230711 16:48:25.189340 15876 Pipeline.cpp:237] Sensor start, sensorType=OB_SENSOR_COLOR streamType=OB_STREAM_COLOR
[I20230711 16:48:25.190340 15876 Pipeline.cpp:239] Start stream done!
[I20230711 16:48:25.190340 15876 Pipeline.cpp:222] Pipeline start() done!
[W20230711 16:48:25.305153 15876 Pipeline.cpp:316] waitForFrame timeout= 110
[W20230711 16:48:25.305153 15876 Pipeline.cpp:86] frameSet is nullptr
[W20230711 16:48:25.429085 15876 Pipeline.cpp:316] waitForFrame timeout= 110
[W20230711 16:48:25.430048 15876 Pipeline.cpp:86] frameSet is nullptr
[W20230711 16:48:25.552284 15876 Pipeline.cpp:316] waitForFrame timeout= 110
[W20230711 16:48:25.552610 15876 Pipeline.cpp:86] frameSet is nullptr
[I20230711 16:48:25.665056 19908 FrameBufferManager.cpp:33] New frame buffer allocated=0.586364MB, total usage: {allocated=0.586364MB, max limit=2048MB}
[W20230711 16:48:25.666056 15876 Pipeline.cpp:316] waitForFrame timeout= 110
[W20230711 16:48:25.667055 15876 Pipeline.cpp:86] frameSet is nullptr

And I’m receiving only IR stream.
I can switch configuration and receive only Depth stream.

But sometimes I can have both streams!
Could you please help me

1 Like

Hi, can you show me how you defined “type”? I got the same issue when enable color stream and depth stream at the same time. Thank you!