I am trying to run a custom blob on an Oak-D Pro, but after creating the pipeline I cannot start the device, getting the following error:
terminate called after throwing an instance of 'dai::XLinkWriteError'
terminate called recursively
what(): Couldn't write data to stream: '__stream_asset_storage' (X_LINK_ERROR)
I have seen a previous thread about this that suggested that using USB 2.0 could cause an issue, however, I have verified that I am using USB 3.2 Gen 2 Type C ports and compatible cables (and have tested several cables). Could someone please help me troubleshoot this issue?
For more details, I have a custom model that takes in the depth information as an input (after it is processed, rotated, and converted to an array), currently just a vector of ones, and outputs the latent depth information. Here's my code, for reference:
auto inData = dai::NNData();
std::vector<double> stuff{1.0}; // Initializes vector with a single element equal to 1
stuff.resize(16000, 1);
inData.setLayer(std::string("exte"), stuff);
dai::Pipeline pipeline_;
std::string blobFilePath = ament_index_cpp::get_package_share_directory("my_package") + "/encoder.blob";
std::cout << blobFilePath << std::endl;
auto nnIn = pipeline_.create<dai::node::XLinkIn>();
auto nnOut = pipeline_.create<dai::node::XLinkOut>();
// std::shared_ptr<dai::node::NeuralNetwork> nn_ = pipeline_.create<dai::node::NeuralNetwork>();
auto nn = pipeline_.create<dai::node::NeuralNetwork>();
nn->setBlobPath(blobFilePath);
// setup XLink
nnIn->setStreamName("nnIn"); // exteroception input after rotating, clipping, resizing
nnOut->setStreamName("nnOut"); // latent exteroception
nnIn->out.link(nn->input); // linking
nn->out.link(nnOut->input); // linking
// Start the pipeline
dai::Device device(pipeline_); // CRASHING HERE